Automate entries in drawing title block
I'm still using ACAD 2007 as it does what I need.
Can anyone direct me on how to build a title box to automate the inclusion of 1) The file name 2) The layer names used in a drawing 3) The date?
I have very simple drawings with no more than 12 layer names. Each layer name will tell the operator the material color and in what order they are to be machined.
White1, White2, Red1, Red2, Red3, etc...
I engrave text into rocker switch operators (the portion that rocks back and forth). These can be seen at https://www.engravers.net/rocker-sw.html
1 Attachment(s)
Re: Build layers into a title block
Quote:
Originally Posted by
autocad799123
I'm still using ACAD 2007 as it does what I need.
Can anyone direct me on how to build a title box to automate the inclusion of 1) The file name 2) The layer names used in a drawing 3) The date?
I have very simple drawings with no more than 12 layer names. Each layer name will tell the operator the material color and in what order they are to be machined.
White1, White2, Red1, Red2, Red3, etc...
I engrave text into rocker switch operators (the portion that rocks back and forth). These can be seen at
I'm not sure what is available for 2007, but "Fields" are what you want.
You can add fields to text or attributes or whatever (rt click while editing text, insert field).
The "dwgname" and "date" are common fields under "SystemVariable"
If you want that as part of your title block and you want to list the available layers in it, you will need some object on each layer to list it in a field using the "object" option.
Re: Build layers into a title block
Fields were added to AutoCAD with the 2005 version so shouldn't be a problem.
This example section of a lisp which loads every time a drawing is opened sets the file name as the Title in Drawing Properties if it has not been set already.
Code:
(defun C:CustomProps ( / doc SummaryInfo KeyCount KeyValue EngOfRec EOR dcl_id SIZ)
(setq doc (vla-Get-ActiveDocument (vlax-Get-Acad-Object))
SummaryInfo (vla-Get-SummaryInfo doc)
); setq
(if(=(vla-get-Title SummaryInfo) "")(vla-put-Title SummaryInfo (vl-filename-base (getvar "dwgname"))))
)
CustomProps
I reference fields in my title block attributes to automate as much as I can. With attribute editor I can easily add to or replace the field in the attribute.
Sorry, don't think those visual lisp functions were available with the 2005 version though.