See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Automate entries in drawing title block

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2022-02
    Posts
    1
    Login to Give a bone
    0

    Default 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

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,505
    Login to Give a bone
    1

    Default Re: Automate entries in drawing title block

    Quote Originally Posted by autocad799123 View Post
    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.
    Attached Images Attached Images

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Automate entries in drawing 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.

Similar Threads

  1. Automate location of object to be inserted into drawing
    By ron.peralta in forum VBA/COM Interop
    Replies: 1
    Last Post: 2007-06-14, 02:13 PM
  2. Replies: 3
    Last Post: 2007-04-06, 12:05 PM
  3. Automate Drawing Update When Modifing a Presentation
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2006-12-24, 04:57 AM
  4. Convert MDT Title Block to Inventor 10 Title Block
    By julesgordon in forum Inventor - General
    Replies: 1
    Last Post: 2005-07-18, 08:34 PM
  5. Title Block Entries
    By bmiller.73395 in forum AutoCAD LT - General
    Replies: 3
    Last Post: 2005-02-08, 07:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •