Wednesday, May 19, 2010

Propulate tutorial for DWG properties

If you want to work with DWG properties inside and outside of AutoCAD learn how to use Propulate as it will automate the work to update these properties.

Together with DWG Columns and DWGInfoTip it is possible to see drawing metadata within Windows Explorer either in one or several columns or as an InfoTip.

DWG Columns

In this example you need to have information in one or many blocks with attributes. Here we have a title block named “Title Block” with several attributes that will be used.

Propulate allows quick, automated population of the Drawing Properties dialog data fields. This data is seen when using the DWGPROPS command or when viewing the properties of a .DWG file though the Windows Explorer, outside of AutoCAD. Drawing Property data can be updated, listed or removed from the current drawing or a subdirectory of drawings.

Using a predefined template, PROPULATE can fill in Drawing Properties data in entire directories of drawings. The information that can be applied includes literal strings, attribute values extracted from specified attributed blocks and lists of attached xrefs, images and fonts. Example: You have a whole project directory full of drawings that use the same attributed title block. Using PROPULATE and a customized template you can have the attribute values from each title block in each drawing extracted and added to that drawing's Drawing Properties dialog. PROPULATE can also insert (into the comment field) a list of the xrefs, images and fonts used by each drawing.

If you make use of attributes you fill find much use of our app JTB BatchAttEdit if you need to edit attributes easily across many drawings.

Run the command PROPULATE.

Command: propulate

Default template file: C:\Users\JTB\Documents\template.prp
Enter an option [Active template/Edit template/List/Remove/Update] <Update>: e

Using the option Edit Template opens up this dialog box. Notice the Block Attributes dropdown at the bottom. Make a selection of what block and attribute you want to add.

In the Template menu select Insert Attribute.

Give the Custom property a name. Here two attributes have been added.

Default template file: C:\Users\JTB\Documents\template.prp
Enter an option [Active template/Edit template/List/Remove/Update] <Update>: u

Update Drawing Properties information from template
Enter an option [Current drawing/Other drawings] <Current>: c

Writing C:\Users\JTB\Documents\AutoCAD Sheet Sets\2 revision test.dwg Drawing
Properties Info.

Running DWGPROPS shows how PROPULATE has updated the custom properties on the drawing.

PROPULATE was created at a time when DWGPROPS only supported up to 10 properties and while DWGPROPS don't have this limitation in newer versions of AutoCAD, PROPULATE still has this limitation. An alternative way is our JTB Batch Change app.

Another limitation with PROPULATE is that it is not compatible with dynamic blocks.

There is also a bug that makes it impossible to use PROPULATE if the DWG file name contains commas and possibly other special characters.

Note: PROPULATE always save the drawing in the latest file format even if Options is set up to save to a previous version.

PROPULATE can be automated with AutoLISP like this where specified template is activated and then the current drawing is updated:

(command "._propulate" "_a" "c:\\Users\\JTB\\Documents\\template.prp"
"_u" "_c")

The above can be used to automatically run before saving the current drawing either by having a special command, menu command or button. Another method is to undefine the qsave, saveas, save, quit and close commands and redefine them to run propulate first.

Unfortunately it is not possible to use a reactor to run propulate before saving a drawing because calling propulate can only be run asynchronized so it in reality is probably run first after saving the drawing.

So here is an example how the most common commands are redefined to make sure propulate is run. Add the code below to the acaddoc.lsp file so it is loaded into each drawing that is opened. SAVEALL and CLOSEALL are not supported here.

(setvar "cmdecho" 0)

(defun propulate ()
  (setvar "cmdecho" 0)
  (command "._propulate" "_a" "c:\\Users\\JTB\\Documents\\template.prp"
"_u" "_c")
  (setvar "cmdecho" 1)

(command "._UNDEFINE" "CLOSE")

(defun c:close ()
  (vla-sendcommand (vla-get-activedocument(vlax-get-acad-object)) "._close\r")

(command "._UNDEFINE" "QUIT")

(defun c:quit ()
  (vla-sendcommand (vla-get-activedocument(vlax-get-acad-object)) "._quit\r")

(command "._UNDEFINE" "SAVE")

(defun c:save ()
  (command "._save")

(command "._UNDEFINE" "SAVEAS")

(defun c:saveas ()
  (command "._saveas")

(command "._UNDEFINE" "QSAVE")

(defun c:qsave ()
  (command "._qsave")

(setvar "cmdecho" 1)

More details as mainly found in Express Tools help file.

Default template file: g:\acad2000\express\template.prp
Enter an option [Active template/Edit template/List/Remove/Update] <Update>: Enter option

Active template
Specify the template file to be used to update Drawing Property fields.

Edit template
Launches a dialog for creating and editing Propulate template files. See Editing the Propulate template.

Displays the Drawing Properties for the current drawing or directories of drawings.

Deletes the Drawing Properties from the current drawing or directories of drawings.

Uses the active template to populate Drawing Properties to the current drawing or directories of drawings.

The following prompt is displayed when selecting the List, Remove or Update options
Enter an option [Current drawing/Other drawings] <Current>:

Current drawing
Applies the selected task to the current loaded drawing file.

Other drawings
Applies the selected task to a user-specified directory of drawing files.

These prompts are displayed when selecting the Other option
Enter search directory and drawing name: Specify a starting location and drawing name or wild-card to search
Search subdirectories? [Yes/No] <Yes>: Enter Yes or No to recursively search subdirectories
For example: g:\project\PG*.dwg will search all drawings whose names start with PG starting in the g:\project directory

Editing the Propulate Template

Propulate uses a template file to determine what values should be inserted into the Drawing Property fields of a drawing. The template file must be edited before use to specify what and where values are applied to the Drawing Properties dialog. You can create as many different templates as you need however there is only one active template at a time. The default template file name is template.prp. The easiest way to edit an existing template or create a new one is to use the 'Edit Propulate Template' dialog.

File menu options

Clears all edit fields in preparation for creating a new template. Will prompt a for a new template file name when the OK button or one of the Save menu options is selected.

Opens an existing template file.

Saves the template file currently being edited.

Save As...
Saves the template file currently being edited to another name.

Template menu options

Insert Xref list
Inserts the @[XREFLIST] command at the current cursor location.

Insert Font list
Inserts the @[FONTLIST] command at the current cursor location.

Insert Image list
Inserts the @[IMAGELIST] command at the current cursor location.

Insert Attribute
Inserts the value selected in the Block Attributes list at the current cursor location.

Make active template
Sets the template currently being edited to be the default template. This option is unavailable if the edited template is already the default or if it has not yet been saved to a file name.

Fill from Current Drawing
Clears all edit fields and fills them with the existing Drawing Properties values from the current drawing. Useful if you want to create a template based on the current drawing.

To edit the template file, enter text or one of the special insert options in the appropriate field. For example, entering Downtown Renovation in the Subject field would insert the string Downtown Renovation into the subject field of the Drawing Properties dialog for each drawing processed with this template. In addition to literal strings like this, there are four special commands that can be used to extract drawing specific information and insert that data into the Drawing Properties dialog.

Special Insert Commands

Extracts the attribute tag value from an attributed block and inserts it in the specified field.
For example: inserting @[title.drawnby] in the Author field causes Propulate to search the drawing for an attributed block named title, extract the value of the attribute tag drawnby and insert that value in the Author field of the drawings Drawing Properties dialog. If common blocks are used across a project it is a simple matter to update a large number of drawings to reflect their specific attribute values.

Inserts a list of the xrefs currently attached to the drawing being processed. Attached xrefs are preceded with 'A'. Overlay xrefs are preceded with 'O'. Only works in the comment field.

Inserts a list of the fonts currently used by the drawing being processed. Only works in the comment field.

Inserts a list of the image files currently attached to the drawing being processed. Only works in the comment field.

Example: Entering @[XREFLIST] @[FONTLIST] @[IMAGELIST] in the Comments field could produce the following:

  A  d:\xrefs\1a6
  A  d:\xrefs\2a6
  A  g:\project\work\3a6


  1. Does this program have the ability to use fields instead of attributes? We use fields with SheetSet information in our title block. The titleblock is xreffed, but the field is "live" in the drawing.

  2. Propulate does not work with fields. What is common practice is to have a part of the title block being a normal block with attributes and then have fields in the attributes.

  3. A great article. Is there a way to use Propulate with a dynamic block?
    To avoid staff using various revision codes (a, A, 1, II, etc.), I made a list to click from.
    Over a year has gone past & I've remembered to run Propulate, only to find a good number aren't populating the drawing properties.
    It seems to ignore the "real" name of the dynamic block and looks at the anonymous reference that is given.

  4. Propulate command has not been updated by Autodesk to support dynamic block. If you would need it we could help to create a similar command but it will cost a bit.

    1. Thanks for the offer. Given the annual cost AutoCAD is to my employer, I'll try them to provide a tool that works with dynamic blocks.

    2. I've reported this bug to Autodesk years ago but still no fix.


Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Subscribe to this blog
JTB World's website | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.