April 27, 2007

File Format Change in AMEP 2008

Here is a heads up for anyone using AutoCAD® MEP or anyone who works with those who do. While AutoCAD® Architecture 2008 uses the same file format as its predecessor, Autodesk® Architectural Desktop 2007, AutoCAD MEP 2008 does NOT use the same file format as Autodesk® Building Systems 2007. Apparently, AutoCAD MEP 2008 files will not be compatible with the 2007 releases.

While the Object Enabler site does not list anything for the 2008 products, an Object Enabler for AutoCAD MEP 2008 is available here. The site lists it being applicable only to the 2008 release of Autodesk products. The Readme does not indicate that installing the enabler would affect the format of any non-AutoCAD MEP files that were opened.

April 26, 2007

Revising a Schedule Table Style

Here is the situation: Some time back you developed a Schedule Table Style that references one or more Property Set Definitions and it has served you well and been used in many drawings. But now you have decided that you need to add a new property to one of those Property Set Definitions, and add a new column to your Schedule Table Style to display the values of that property. You diligently edit the Property Set Definition and Schedule Table Style in your office's central source file and test it out in some newly created drawings and all is working well.

You then announce the change to the rest of the firm, and someone who has a project in progress tries to add the new Schedule Table Style to an existing drawing that already had the old version. No matter how many times the new Schedule Table Style is dragged into the existing drawing in Style Manager, it seems as though the old version refuses to leave. Worse yet, if you delete all existing instances of that Schedule Table Style from the drawing and purge the old definition, when you add the new one, is still does not have your newly added column! What gives - is your drawing doomed to being eternally haunted by the old version of the Schedule Table Style?

Fortunately, the answer is no. The reason why the new Schedule Table Style loses the new column is that the old Property Set Definition is still present in the existing file. When you imported the new style into a new drawing to test it, it would have brought along the new version of the Property Set Definition, provided it was not defined in the new drawing (which is why you should keep your styles in source files and import them when needed, and not preload them into your template files). But, if the target file already has a Property Set Definition of that name, which would be the case in that existing file that had the old version of the schedule, the new Property Set Definition is not imported and the old version will remain. And since the new property does not exist in old Property Set Definition, the column referencing that property gets deleted from the Schedule Table Style.

The solution is to copy the new Property Set Definition into the existing file first, then copy the new Schedule Table Style. Now the new column will stay in the Schedule Table Style, and you are good to go. Of course, if the new property is a manual one, any existing objects/styles will have the default value, which you will likely need to edit, unless the default value just happens to be correct.

April 15, 2007

ACA 2008/ADT 2007: Setting a Different Property Data Format in a Formula Property

A new feature added to Autodesk® Architectural Desktop 2007 and also available in AutoCAD® Architecture 2008 builds on the addition of the Sample Value pane to the Formula Property Definition dialog in the 2006 release. The Sample Value pane allows you to test the formula you have written by entering sample values for the other properties referenced by the formula. The 2006 release listed the Property Data Format [PDF] that was assigned to each referenced property; starting in the 2007 release, you can change that initial assignment to any of the other PDFs defined in the current drawing.

Not only does the PDF assigned in the Sample Value pane affect the way the sample value is displayed in the Formula Property Definition dialog, it affects the way the value is input to the formula itself. Furthermore, the PDF assigned in the Sample Value pane works on the "raw" value of the referenced property, BEFORE the PDF assigned to the property is assigned. This means that you no longer need to create an unformatted version of a property for use in a formula calculation as well as a formatted version for display in a Schedule Tag or the Properties palette. This can be a big time saver if you never need your formula properties to work in versions of ADT prior to 2007. Since saving back to prior releases without exploding ADT objects is generally a difficult thing to do, most using 2007 or 2008 should be able to take advantage of this feature.

It also means that if you set up a formula that references a property, then later decide to change the PDF assigned to that property, you will also have to go back to the formula property and change the PDF there if you want the changed PDF to be used in the formula property as well. This is how I "discovered" this feature - I had set up a property in ADT 2007, used it in a formula, realized I needed to increase the precision of the PDF assigned to the property, and was surprized to find that the formula property was still acting as though the precision had not been changed. After poking around a bit in the file and making certain that I had actually changed the precision on the property, I finally opened the formula and noticed that the PDF showing in the Sample Value pane was still set to the "old" value, that I could change the PDF to any other one in the file, and that the assigned PDF was what governed the way the data was brought into the formula. I currently use ADT 2004 on a day-to-day basis at work, so it may be possible that back when 2007 came out, I was aware of being able to set a PDF in the Formula Property Definition dialog, but I am fairly certain that I did not understand exactly what that meant until yesterday.

The following screen captures illustrate the potential for this feature. A drawing file was created and the units set to inches, Engineering format, with a precision of eight decimal places, so that the effects of varying precision in the PDF would not be masked by the units or precision in the drawing file. A wall was drawn, with a length of one hundred and five one-hundred-millionths inches [8'-4.00000005"] and a height of one hundred and one two-hundred-fifty-sixth inches [8'-4.00390625"]. The image below shows part of the Design tab of the Properties palette with this wall selected, and shows the length and width in Engineering units, with eight-decimal-place precision.
Two new Property Data Formats were created: Length - Extremely Short, a copy of Length - Short, with the precision increased to 1/256 of an inch...
...and Standard-8, a copy of Standard, with the precision increased to eight decimal places and no zero suppression. [Click on any reduced image to see a full-size version.]
A new Property Set Definition called WallObjectsTest01 was created, and properties referencing the Height and Length automatic property sources were added to it. The Length - Extremely Short PDF was assigned to the Height property and the Standard-8 PDF was assigned to the Length property. Five formula properties were added to the Property Set Definition, to demonstrate the effects of various PDF assignments in the Sample Value pane. Each of the five formula properties simply passes through one of the automatic property values and is assigned the Standard-8 PDF, so that it will display at maximum precision in the Properties palette. A summary of the properties in the WallObjectsTest01 Property Set Definition can be seen in the image below.
The Height-LengthExtremelyShort formula property keeps the default Length - Extremely Short PDF assigned to the Height value.
The Height-Standard formula property changes the PDF assigned to the Height property value in the formula to Standard.
The Height-Standard-8 formula property changes the PDF assigned to the Height property value in the formula to Standard-8.
The Length-Standard formula property maintains the Standard PDF assigned to the Length property.
The Length-Standard-8 formula property changes the PDF assigned to the Length property value in the formula to Standard-8.
The image below shows the values returned by each of the properties in the WallObjectsTest01 Property Set Definition for the test wall previously described.Note the following results:
  • The Height automatic property reports the height in architectural imperial units with a precision of 1/256 of an inch, in this case, the exact value is reported, since the height was set to exactly 8'-4 1/256".
  • The Height-LengthExtremelyShort formula property returns a value of 8. This is an improvement over earlier releases, where the presence of the embedded double quotation mark used as an inch symbol would have caused an error, but the value would likely not result in a correct calculation. Beware using formatted values in formula properties.
  • The Height-Standard formula property returns a somewhat more accurate value, but it is rounded at the third decimal place, because the Standard PDF has a precision of three decimal places. That may well work for certain calculations, but if you need greater precision for a given calculation, you will want to create a PDF that provides it.
  • The Height-Standard-8 formula property returns the full decimal equivalent value, because the eight-decimal-place precision of the Standard-8 PDF is capable of delivering it.
  • The Length automatic property reports a length of 100. This is because it has the Standard PDF assigned, so the precision is limited to three decimal places and trailing zeros are suppressed.
  • The Length-Standard property also reports a length of 100. This is because Standard PDF is applied to the Length value, resulting in a value of 100. When this value is returned from the formula property, it is interpreted as an integer, and the eight-decimal-place precision for real numbers in the Standard-8 format, which is assigned to the formula property itself, does not come into play. If the formula property were amended to include a CDbl function to force the Length value to be interpreted as real number, the result would be 100.00000000, as the five hundred-millionths would have already been lost when the Standard PDF was applied to the Length value.
  • The Length-Standard-8 property reports the actual length of the wall, including the five hundred-millionths, despite the fact that the fractional amount was lost in the reported value of the Length property itself.

April 11, 2007


Nigel Davies has an interesting post on BIM in this article at Eat Your CAD. Thanks to Tomislav Zigo for his post in Bimology for calling my attention to this article.

April 10, 2007

Multiple-Line Room Tags

There have been several recent requests for information on creating multi-line room tags in ADT/ACA. I thought I would collect the links I have been posting in a single article here, to make replying to future requests easier and to make certain I do not forget one or more of the resources.

Using Multiple Manual Properties to Enter the Room Name, And Then Combining Them in a Formula Property
This thread contains a sample file of an early version, done in ADT 2004, that supports two-line room names, from June 6, 2003. Download the sample from the file reposted on August 24, 2004.

In this thread, you will find a more clever formula, which supports three lines and could be easily expanded to even more lines, from January 25, 2005. That thread was also discussed in two blog articles, on July 4, 2005 and July 9, 2005.

Using a Single Manual Property to Enter the Room Name with MTEXT Codes, And Then Stripping the MTEXT Codes With a Formula Property
This Autodesk Knowledge Base article contains instructions on how to create a multi-line room tag using this approach.

Using a Single Manual Property [Driven by a List Definition in 2007 or Later], an Index Number and Multiple Formula Properties
Tomaslav Zigo posted this article to his blog showing a way to have a two-line room name tag populated from a single source and split at a user designated place without the need to type in MTEXT codes. This allows the use of List Definitions for the room name [and index] in 2007 and later, contrary to this previous post.

Multi-Line Attributues
Unfortunately, the new multi-line attributes added to AutoCAD® 2008 are not active when incorporated into a view block of a Multi-View Block Schedule Tag in AutoCAD® Architecture 2008. Here is hoping that feature makes its way into next year's release, so that a single attribute that does not need to be repostitioned can display multi-line room names and eliminate the need for fancy formulas.

April 06, 2007

Annotative Tags With Leaders in ACA 2008

The image above shows three interior walls drawn in AutoCAD Architecture 2008, with the out-of-the-box wall tag applied. Like all of the tags in 2008, the wall tag makes use of the new annotative scaling, as does the leader that is drawn as part of the tag tool function. These were created with the annotation scale set to 1/8" = 1'-0", as can be seen on the Drawing Window Status Bar. [Click on the image to see a larger version.] So, what happens when you change the annotation scale?
The image above shows the annotation scale being changed to 1/4" = 1'-0".
As you might expect, the tags have reduced to half of their size at 1/8" = 1'-0", maintaining their insertion points. The "arrow head" on the leader has also reduced in size by 1/2, but notice that the tag end of the leader remains stubbornly in the same place it was when it was created for the 1/8" = 1'-0" size of the tag, leaving a gap between leader and tag at 1/4" = 1'-0". Ideally, the leader end would have adjusted to the change in the tag.
Hovering over the leader of the A2 tag, as seen in the image above, causes the annotative icon to appear above and to the right of the cursor. The icon looks like the ends of two three-sided scales.
The end of the leader at the A2 tag has been grip edited to extend the end to the midpoint of the top of the tag at 1/4" = 1'-0". But will that also change the endpoint at 1/8" = 1'-0"?
As you can see in the image above, when the annotation scale is changed back to 1/8" = 1'-0", the end of the leader at that scale remains in its original position, and if you were to change it back to 1/4"=1'-0" again, the edit at that scale will be "remembered," as seen below.
So, while the leader end at the tag will not automatically move to maintain its relative position at the surrounding graphics of the tag as the tag changes sizes for different scales, you can manually edit the leaders and the endpoint location will be retained separately for each scale. This behavior applies to all leaders that have an annotative Dimension Style, which will come in handy when placing a room tag outside of a small room. You can now use a single leader on a single layer and have it work for every scale at which you will show the tag, with a little work to edit the leader endpoint to work with each scale.

April 01, 2007

ADT 2006 & Prior - Angular Automatic Properties

Here is a heads up for anyone using ADT 2006 and prior and making use of any of the automatic property sources that report the measurement of an angle, such as the Included Angle of an Arc, the Rotation of a Block Reference or the Roll of a Structural Member. The angular value will be reported based on the current setting of the AUNITS System Variable, and for any setting other than 0 [decimal degrees], the value will have non-numeric formatting attached - a suffix of "r" for radians; a suffix of "g" for grads; "d", "'" and """ for degrees/minutes/seconds; and "d", "'" and """ plus "N" or "S" and "E" or "W" for surveyor. The precision of the number will be based on that of the AUPREC System Variable, not that of the Property Data Format assigned to the automatic property.

If you want to use the anglar value for mathematical calculations in a formula property, assuming that AUNITS is set to 0 and AUPREC is set to a sufficiently high value will cause problems if AUNITS is set to anything else and may cause problems with accuracy if AUPREC is set too low. Also keep in mind that the VBScript angle functions take angular input in radians, so even if you have decimal degrees with appropriate precision, you will need to convert the value to radians first. There does not appear to be a constant for the value of PI in VBScript, so you will need to type that into your formulas manually, with sufficient precision for the task at hand. 3.14159265358979323846264...

The good news is that in ADT 2007, the value of angular automatic property sources are reported in unformatted radians, using the real number precision set in the assigned Property Data Format. If you are migrating formulas from 2004-2006 to 2007 or later that use automatic angles, you will have to adjust them to the changed source value, but at least you will have a consistent value from which to start.