November 29, 2005

Out-Of-The-Box AutoCAD Tool Palettes in ADT

If you installed the ADT as AutoCAD shortcut and use it, you may have become familiar with the out-of-the-box AutoCAD Tool palette tools, and wish you had access to them when running ADT as ADT. If so, read on.

When I first tackled this problem, I discovered that I could run ADT as AutoCAD to get the AutoCAD Tool palettes on screen. Then I opened the Content Browser, which is a separate program and can be run independently of ADT. [The executable, AecCB47.exe, is located in the same folder as the acad.exe file, C:\Program Files\Autodesk Architectural Desktop 2006 in the default installation location.] I created a catalog, created palettes within it, and laboriously cut and pasted the tools from each palette. Afterwards, I got smarter and came up with the following:

  1. Start ADT as AutoCAD.

  2. Open the Options dialog, and go to the Files tab.

  3. If necessary, scroll down until you see the Tool Palettes File Locations category.

  4. Expand that category, and make note of the location where the AutoCAD tool palettes are stored.

  5. Close the Options dialog, and close ADT as AutoCAD.

  6. Start ADT as ADT.

  7. Open the Options dialog, go to the Files tab and expand the Tool Palettes File Locations category.

  8. Click on the Add… button.

  9. Click on the Browse… button and navigate to the folder where the AutoCAD tool palettes are stored. Leave this at the bottom of the list.

  10. Click on the OK button to exit the Options dialog, saving your changes.

  11. If necessary, change the current Palette Group to All Palettes, and you should be able to access the AutoCAD tool palettes.

At this point, if you wish, you can open the Content Browser, create a catalog, and drag-n-drop the AutoCAD tool palettes to the catalog. That is much easier than copying the tools on each palette to the clipboard and pasting them into a tool palette in the Content Browser, one palette at a time. Once you have the palettes it an ADT Tool catalog, you may, if you wish, go back into the Options dialog and delete the path to the AutoCAD tool palettes location, then i-drop them into your current workspace. That will set up a separate copy of the tool palettes, so if you plan to edit them, you may simply want to keep using them in the out-of-the-box location.

Note also that, when I did this using either method, the graphics for the tools when brought into ADT were not as crisp as they were in AutoCAD. You could always create new images and apply them in ADT if you really wanted to do so – I am not certain what impact that would have when running ADT as AutoCAD, so you may want to do that on a copy of the palettes.

November 28, 2005

Exporting Tool Palette Groups

New to ADT 2006 is the ability to export tool palette groups to an external file, with an extension of XPG. This file can then be copied to another machine and imported there. You could also export tool palette groups you no longer need, but want to save in case you need to restore them in the future.

To export a tool palette group, right click on the spine of the Tool palettes and choose Customize... from the context menu. On the right side of the Customize dialog, in the Palette Groups list box, right click on a tool palette name and choose Export... from the context menu.

In the Export Group dialog, navigate to the folder in which you wish to store your XPG file, provide a name and select Save to create the file. The palette group you select, and any nested palette groups will be included in the exported file.

To export all of the palette groups, scroll down to the bottom of the Palette Groups list box and right click below the bottom line. Choose Export All... from the context list and save the file as noted above. All of the palette groups will be included in the exported file.

Importing palette groups is similar; right click a palette group or below the entire list and choose Import... from the context menu. Navigate to the desired XPG file and choose Open to import the palette group[s].

Note that this does not export or import the tool palettes associated with each group, so you can not share the actual palettes this way. I have found that if I import a palette group back onto the same computer where the palettes remain in the active profile, the palette groups are populated with the palettes, so it does "remember" which palettes were in each group. If you do this in a different profile, with a different tool palette workspace that does not have the same palettes, the groups will not be populated.

I do not have access to multiple computers that have ADT 2006 installed, so I do not know exactly how the groups are saving the list of palettes associated with each group, but I suspect it may be using the globally unique identifier [GUID] assigned to each palette. If the GUIDs of refreshable pallete pulled from the same, network-based catalog are the same, and those palettes are loaded on two different computers, you should be able to export the palette groups on one computer and import them on the other and have them be populated with the tool palettes. Unfortuately I can not test that suspicion to see if it holds true, or whether it is necessary to have the palettes installed before importing the palette groups.

November 25, 2005

First Anniversary

Can it really be an entire year since I started this blog? The calendar says so, but it does not seem like it to me. Best of luck to all of you who are attending Autodesk University this year. I am not going this year, but hope to do so again in the future.

For those not going, but looking to improve their ADT skills, check out the AUGI Training Program course on Door/Window Assemblies offered this month by Steve Bennett.

November 14, 2005

Dealing with NA in Formulas

ADT will report NA for an automatic property when that property does not have a value assigned for a particular object or style. The actual text displayed in controlled by the Property Data Format assigned to the property on the Formatting tab, in the General section, in the Not Applicable edit box. When reading a property that could have such an "empty" value into a formula property, VBScript will interpret the value as being "Empty", the formatting applied in the Property Data Format will not follow through. You can not test the value of the automatic property for "NA", or whatever string you assign to it. Update, 9/3/2006: If you enclose the text in the Not Applicable edit box in the Property Data Format with explicitly typed double quotation marks, the string value will be returned, rather than "Empty". See this article for additional information on this.

Attempting to perform mathematical operations, or even to convert the value to a particular type [using the CDbl function, for example] will result in an error and the formula will fail.

One solution for this, assuming the original automatic property has a numeric value when a value is assigned, would be to create an intermediate formula that uses either the VBScript TypeName or VarType function to test the automatic property value to see if it holds an empty value [TypeName returns the string "Empty"; VarType returns the integer 0]. If it does, have the RESULT of the formula be a number that is either meaningful to an "Empty" condition, or is at least unique - meaning that it would not be used when a numeric value is assigned. Then you can use the value of the intermediate formula in your final formula, testing, if necessary, for the value assigned for the "Empty" condition and taking the appropriate action.

A sample file demonstrating this condition and solution can be found in this thread in the Autodesk Architectural Desktop 2005 Discussion Group. The automatic property in question here is the door thickness. For cased opening door styles [using the Pass Through door type], there is no door, and the thickness property is "Empty" for doors using the Pass Through type. The request was to be able to have the thickness of existing doors show as "--" on the schedule while having the thickness show for new doors. The problem was the formula would fail when a new cased opening was scheduled, as applying the CDbl to the value of the automatic property in the formula property [to force whole numbers to be interpreted as reals] does not work when the value is empty.

The intermediate property in the example file, ThicknessForFormula, sets its value to 0 if the automatic property is "Emtpy", otherwise it passes through the value of the automatic property without doing anything to it. If there is no door leaf, then 0 would seem to be an appropriate value for the thickness. The final formula, ThicknessForSchedule, then tests that value and I chose to display "--" in the schedule if it is zero, otherwise the value is forced to be a double and the Length - Short Property Data Format is applied to get imperial architectural formatting.

November 02, 2005

Filtering Objects in an ADT Schedule

The first level of control over which items appear in your schedule is by setting up the appropriate object types on the Applies To tab of the Schedule Table Style. You can further control the objects of those object types that are to appear in your schedules without laboriously selecting individual items – which is not even possible when scheduling through externally referenced files or through an external drawing – by filtering out unwanted items. You can set up filters in two different ways:

1. Layer Filter: This is applied to each individual instance of a schedule, in the Properties palette. It requires that you have placed items to be scheduled and items not to be scheduled on separate layers. You will need to add the layer filter every time you add a new schedule table. If you are scheduling through an externally referenced file, be certain that your layer filter includes the layer on which the Xref is inserted and also includes the externally referenced layer names. For example, if you have a file called A01.dwg that has doors you wish to schedule, those doors are on layer A-Door-N and that file is externally referenced into another file, on layer A-Anno-Refr-N, where you will be generating your door schedule, then your layer filter may want to be something like
You can include multiple filters in the layer filter – separate each with a comma.

2. Classifications: You can set a classification filter on the Applies To tab of the Schedule Table Style. This will apply to all instances of the schedule, without any further action on your part. Note that you must have your Classification Definition in the file with your Schedule Table Style prior to trying to set a Classification filter.

Classifications are assigned at the style level, so they only work for ADT objects that have styles/definitions. They will not work for AutoCAD objects, including block references. For classifications to work, you need to have separate object styles for objects to be scheduled and objects that are not to be scheduled. [In other words, you can not use the same style for two objects, one to be scheduled and the other not to be scheduled.]

The Classification Definition you use should have at least two classifications defined within it. One [or more] classification[s] would be assigned to the objects to be scheduled and one [or more] classification[s] would be assigned to the other objects. You could have just one classification, for objects to be scheduled, and leave the unscheduled objects unclassified, but that may cause problems down the line, when you or someone else working on the project tries to remember/determine whether a style was intentionally not classified so as not to be scheduled or was simply either overlooked or added after the initial schedule was created.

Exactly how you should set this up depends upon whether you want to use the same Classification Definition for other purposes. One method that others have recommended here is to use the out-of-the-box Uniformat classification system, assigning appropriate classifications to each door style, keeping track of those that should be scheduled, then checking only those on the Applies To tab of your Schedule Table Style. Another method, and one which I have used successfully, is to set up a Classification Definition just for scheduling, with two classifications: Schedule and NoSchedule. This makes the intent very clear; if you have need to use the out-of-the-box Uniformat classifications or one of your own for other purposes, you can attach that along with the one for scheduling, and need not worry about which of those classifications are scheduled and which are not.