Originally Published 10/23/2013
This is the third and final part of this series. In Part 1 I gave an overview of the three different solutions for adding revision tables to drawings in Autodesk ® Inventor, Autodesk ® Autocad and Autodesk ® Autocad Electrical. Part one also included the various snippets of iLogic code and AutoLisp programs being used to control the revisions, with the revision data coming from Autodesk ® Vault Professional’s Item Master.
Part 3 here will detail how I created the revision table block that I use in Autodesk ® Autocad, along with the lisp program I posted in Part 1. In Part 2 I covered a bit of the setup on the Vault end, and how I set up the Inventor revision table to work with the Vault properties and the iLogic code. The revision table setup for Autodesk ® Autocad Electrical was covered in Part 1, and is fairly straight forward so I don’t plan to go into more detail on that one unless I make some major changes to it. if so,… that will be part 4!
The revision table for Autocad began with a table, setup with the columns I want to show in a standard revision block.
|Revision Table before Block Command|
The fields of the table still need to defined at this point, but since Autodesk ® Vault properties cannot be mapped directly into the field of a table, I needed something else to map them to. Block attributes seemed to be an easy solution, but this isn’t a block yet…. so there are no attributes to map the table fields to. My head started spinning about now. I created a block with 4 attributes, Rev, Revby, Revapp and Revdes. I set them all to invisible in the block, and then inserted the block into my working drawing. (In my case this just happened to be the drawing where my tool palette blocks are store, since I planned to add the finished product to a palette.)
Right clicking in the fields of the table (which at this point were still blank), I selected the option to Insert Field. Under Field Category, I select Object.
|Field Definitions in Table|
Under Object Type in the center section of this dialog box, I picked the button next to the as yet empty field, which takes me out to a “select objects” prompt. I want to link these fields to the attributes in the block I just added to my drawing, but since nothing is visible, there is nothing to pick…. so I enter “L” at the command prompt to select the last item added to the drawing. The field definition window grabs the newly created block and now looks like this:
|Field Definition with Block Reference|
The attributed of this block are now available to be assigned to the fields in my table. For the first column “REV”, I assign the attribute Rev and hit the OK button. I repeat the steps for each of the remaining fields until they have all been assigned to the appropriate attributes in my invisible block.
Now I am ready to make a block of this table that can be placed in my drawings via the tool palettes. But since I need to bring those attributes along for the ride, I need to nest the invisible block within it.
Calling the block command, and using the “Select Objects” button, I first type “L” at the command prompt to grab the Last object added, which at this point is still my invisible block with the 4 attributes. I then select the table itself, give the block a name and an insertion point and check the box that says “Allow Exploding”. This is important for use with the lisp program. Save the block and it should be ready to use. In my case, since I was working in my palette block drawing, I saved the overall drawing, and then dragged the newly created revision block to the appropriate tool palette.
I right click on the new palette item and select Properties, then set the block to explode on insertion.
Notice that the lisp program “tabmod” (code listed in Part1 of this series) is located beneath the new “REVTABLE” block. When this block is inserted from the palette, it explodes on insertion, exposing the table. Using the Autodesk ® Vault “Update Properties” command will pull the properties from the Vault Item Master which are mapped to the 4 attributes in the magical invisible nested block, which in turn are tied to the field definitions of the table (the leg bone’s connected to the thigh bone?), and populates the table with the property definitions for that drawing, as set in the Autodesk ® Vault Item Master. The tabmod program, which will be called at the next revision, locks the cells of that first table row, and adds the next row… ready to accept updated properties from the Item Master…. and so on.
It’s been a while since I actually set this all up, so I’m hoping in the interim I haven’t forgotten any steps. As always, this is what worked for me, I never claim that my tips are the only solution to a given problem…. or even that they are the right solution. So as always, take these for what they are worth to you and…
And to further illustrate that these are not always the perfect solutions…. this didn’t work at all! Oy. One of those, hmmm… it worked yesterday things. My fix is to create Autocad custom drawing properties for each of the properties in the revision block, and corresponding to the properties being pulled in from Item Master. If the Item Master properties are set to “Create”, these will be created for you in your drawings whenever you do a Get Revision. In my master block in the palette source file, I changed all of the table fields so that they were mapped to these properties.
|Custom Drawing Properties|
So far this is working better… but I’ll keep you all posted. My apologies to any of you that tried this and got frustrated that it wasn’t working.
“Autodesk® screen shots reprinted with the permission of Autodesk, Inc. Autodesk ® , AutoCAD ® , DWG, the DWG logo, Vault®, Autocad Electrical® and Inventor® are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and other countries.” Programs and programmers’ information used with permission. Thanks guys!