The muzzles have been removed, and participants in the Beta program for the 2008 release of AutoCAD Architecture (formerly known as Autodesk® Architectural Desktop) are now allowed to discuss the new features. I have been extraordinarily busy of late (was that not my excuse last year, too?), so bear with me while I try to find time to write about what you can expect in 2008.
One item that is really an AutoCAD feature but which I have not read about yet in any of the AutoCAD® 2008 blog postings (check out Lynn Allen's Blog and AutoCAD Insider by Heidi Hewett if you have not already done so) is yet another system variable to control the way linetypes display.
"Oh, dear! Not another variable to add to the existing CELTSCALE, LTSCALE and PSLTSCALE. I can not keep those straight - and now there is another?" you might be thinking. Before you don sack cloth and ashes and head out to wander aimlessly while cursing the fates aloud, relax - this is the feature you have wished for since paper space was introduced in Release 11.
The new system variable is called MSLTSCALE. A setting of 0 will result in the behavior you know and love so well in your current AutoCAD-based product. Setting it to 1 is where the magic begins. With MSLTSCALE set to 1, PSLTSCALE set to 1, LTSCALE set to whatever your office standard is for plotting at 1:1 (it may be 1, some use 0.5, my firm uses 0.375) and CELTSCALE set to 1 (not an absolute requirement, but I would recommend having the object linetype scale for newly created objects set to 1 and only change that in very rare instances when absolutely necessary on an object by object basis), you need NEVER CHANGE THESE VALUES AGAIN!
Yes, you read that correctly. Even if you are one of the elite who understand how LTSCALE and PSLTSCALE work in current releases, just think of all the time you will save trying to explain that to the unenlightened. One of the features of the new annotation scaling everyone is buzzing about is that now AutoCAD has a scale setting when the Model tab is active, and so now that you can tell AutoCAD the scale at which you are working, AutoCAD can figure out how to scale linetypes without you manually changing the value of LTSCALE. Perhaps this feature is not "worth the cost of the upgrade" - but it is a mighty fine addition and one that I hope to be using in the not too distant future.
February 23, 2007
February 16, 2007
Dealing With "*Xxx not found*" Location Property Result
Update for 2007 and later:
Change the formula properties in the examples below (or in the sample file downloaded from the Discussion Group) to test for "*Space not found*", rather than "*Area not found*". Area objects were merged into the new-and-improved Space object in 2007, so opening the sample file in 2007 or later will convert the Area objects in the sample file to Space objects, and the "not found" return value will change to "*Space not found*".
A location property will return *Xxx not found*, where Xxx is Space, Area or AEC Polygon, if the location grip for the object to which the location property is attached can not find an object of the type specified in the location property. This value is not a string - the VBScript TypeName and VarType functions crash when evaluating this value, so I have no idea what it actually is.
A denizen of the Autodesk Architectural Desktop Discussion Group posted a request for a method of dealing with this return value. The situation was one where a location property was being used with Areas, so that, where appropriate, a subordinate Area's area could be read into the main Area's properties and shown on a schedule. There would be main Areas, however, that would not have subordinate Areas; these would get the dreaded *Area not found* in the Location property and seing that in the schedule was not acceptable. When writing a Formula property to return "-" when there was no subordinate Area, the formula crashed when trying to compare the Location property value to *Area not found*. I have posted a sample file, done in ADT 2004, in a reply to that thread, that addresses the issued raised and also shows how you can create a Formula property from the Location that has a real number value with which calculations can be done. In the "not found" case, the real number is set to zero. Please note that the sample file was created to show possibilities, and the properties included are not optimized to a specific need. Some of the "formatted" properties would not be needed if the values were not being displayed in a Schedule Tag, as the "Unformmated" version could be placed as a column in a Schedule Table Style and a Property Data Format applied there. Some of the Formula properties might also be combined if there were no need for the intermediate results. Also note that the sample file was done in imperial units; the same concepts should apply to metric unit drawings as well.The image above shows the test objects in my sample file. There are three Area objects, two ten-foot square Areas, Living Room 100 and Bedroom 101, and a fifteen square foot Area for Balcony 101A. As you can see, Balcony 101A is subordinate to Living Room 100, as the Living Room Area's location grip is positioned over the Balcony Area. Neither the Balcony nor the Bedroom have a subordinate Area. For scheduling purposes, I created a Classification Definition that applies to Area objects, with two classifications - Main and Subordinate. The Living Room and Bedroom objects use an Area Style that has been classified as Main; the Balcony's Area Style is classified as Subordinate. This makes including only Main Areas in a Schedule Table easy, even if the Schedule Table is not in the same file as the Areas.
Writing an if condition to test the value of the Location property is fairly easy. Simply enclose the Location property and the test phrase in double quotation marks, and VBScript will do a text comparison. The problem is how to return the Location property value when an Area is found in a usable data format. You can not pass through the "raw" Location property value, as VBScript evaluates the entire formula, not just the logical path followed for each object, and *Area not found* will result in an error for Areas with no subordinate area. If the only need is a string which can be displayed in a Schedule Table, the solution is easy and the same as that for the if condition - enclose the property in double quotation marks. In the sample file, I have two location properties - SubordinateAreaFormatted and SubordinateAreaUnformatted. Both reference the BaseAreaUnformatted property of the subordinate Area; the formatted version uses the out-of-the-box Area Property Data Format; the unformatted version uses a custom Property Data Format called Standard-8, which is a copy of the Standard Property Data Format with the precision set to eight decimal places to maintain maximum precision, and, in this case, no zero suppression. The SubordinateAreaModified01 Formula property uses these two properties to test for "*Area not found*" and return "-" if found or the SubordinateAreaFormatted property as a string if an area is found. The formula is shown below:
This property can then be added to a Schedule Table, as shown below:
That is all well and fine if all you want to do is display the subordinate area in a Schedule Table. But what if you wanted to be able to have the Area as a numeric value, with which you could do some calculation? The same limitations encountered above will apply, and the solution used in the sample file is to accept that the Location property will have to be converted to a string to avoid an error in the formula, then to take that string and convert it into real number. In the sample file, this is handled by two separate Formula properties; you could easily combine them into one Formula property that does it all. The SubordinateAreaModified02 Formula property looks remarkably similar to the previous one, with the exception that the result when an Area is not found is "0.0" rather than "-" and the unformatted Location property is used. That is because we want to convert these values to real numbers, and non-numeric characters will cause an error.
The text values of the property would appear like the image below, if it were added to a Schedule Table.
The SubordinateAreaReal Formula property takes the value of the SubordinateAreaModified02 Formula property and uses the CDbl function to convert the strings to real numbers. Be aware that if you pass a string that contains any non numeric characters, other than an initial minus sign or a decimal point, using CDbl will result in an error. That is why the unformatted version of the Location value is used in the SubordinateAreaModified02 Formula property. The image below shows this property in a Schedule Table.
CDbl ( [SubordinateAreaModified02] )
A combined Formula property, not included in the sample file, might look something like this:
Now that we have a real number value, we can do math! [Trust me, that is a good thing.] Suppose that for rental purposes, the area of the balcony gets included at 75% of its actual area, along with the main area. The TotalAreaUnformatted Formula property is a simple, one-line calculation that does just that, and leaves the result unformatted should there be a need to do further mathematical operations on the result.
[BaseAreaUnformatted] + ( 0.75 * [SubordinateAreaReal] )
The TotalAreaFormatted Formula property simply passes through the value of the TotalAreaUnformatted property, applying the Area Property Data Format to it. If you are not going to include this value in a Schedule Tag, you could omit this property and use the TotalAreaUnformatted value as a column in your Schedule Table Style, changing the Property Data Format for the column to Area. The image below shows the formatted value in a Schedule Table.
You can click on the image below to see a larger version of the entire table, with some explanatory text below each column, or download the sample file from the Discussion Group thread and look at it live.
Change the formula properties in the examples below (or in the sample file downloaded from the Discussion Group) to test for "*Space not found*", rather than "*Area not found*". Area objects were merged into the new-and-improved Space object in 2007, so opening the sample file in 2007 or later will convert the Area objects in the sample file to Space objects, and the "not found" return value will change to "*Space not found*".
A location property will return *Xxx not found*, where Xxx is Space, Area or AEC Polygon, if the location grip for the object to which the location property is attached can not find an object of the type specified in the location property. This value is not a string - the VBScript TypeName and VarType functions crash when evaluating this value, so I have no idea what it actually is.
A denizen of the Autodesk Architectural Desktop Discussion Group posted a request for a method of dealing with this return value. The situation was one where a location property was being used with Areas, so that, where appropriate, a subordinate Area's area could be read into the main Area's properties and shown on a schedule. There would be main Areas, however, that would not have subordinate Areas; these would get the dreaded *Area not found* in the Location property and seing that in the schedule was not acceptable. When writing a Formula property to return "-" when there was no subordinate Area, the formula crashed when trying to compare the Location property value to *Area not found*. I have posted a sample file, done in ADT 2004, in a reply to that thread, that addresses the issued raised and also shows how you can create a Formula property from the Location that has a real number value with which calculations can be done. In the "not found" case, the real number is set to zero. Please note that the sample file was created to show possibilities, and the properties included are not optimized to a specific need. Some of the "formatted" properties would not be needed if the values were not being displayed in a Schedule Tag, as the "Unformmated" version could be placed as a column in a Schedule Table Style and a Property Data Format applied there. Some of the Formula properties might also be combined if there were no need for the intermediate results. Also note that the sample file was done in imperial units; the same concepts should apply to metric unit drawings as well.The image above shows the test objects in my sample file. There are three Area objects, two ten-foot square Areas, Living Room 100 and Bedroom 101, and a fifteen square foot Area for Balcony 101A. As you can see, Balcony 101A is subordinate to Living Room 100, as the Living Room Area's location grip is positioned over the Balcony Area. Neither the Balcony nor the Bedroom have a subordinate Area. For scheduling purposes, I created a Classification Definition that applies to Area objects, with two classifications - Main and Subordinate. The Living Room and Bedroom objects use an Area Style that has been classified as Main; the Balcony's Area Style is classified as Subordinate. This makes including only Main Areas in a Schedule Table easy, even if the Schedule Table is not in the same file as the Areas.
Writing an if condition to test the value of the Location property is fairly easy. Simply enclose the Location property and the test phrase in double quotation marks, and VBScript will do a text comparison. The problem is how to return the Location property value when an Area is found in a usable data format. You can not pass through the "raw" Location property value, as VBScript evaluates the entire formula, not just the logical path followed for each object, and *Area not found* will result in an error for Areas with no subordinate area. If the only need is a string which can be displayed in a Schedule Table, the solution is easy and the same as that for the if condition - enclose the property in double quotation marks. In the sample file, I have two location properties - SubordinateAreaFormatted and SubordinateAreaUnformatted. Both reference the BaseAreaUnformatted property of the subordinate Area; the formatted version uses the out-of-the-box Area Property Data Format; the unformatted version uses a custom Property Data Format called Standard-8, which is a copy of the Standard Property Data Format with the precision set to eight decimal places to maintain maximum precision, and, in this case, no zero suppression. The SubordinateAreaModified01 Formula property uses these two properties to test for "*Area not found*" and return "-" if found or the SubordinateAreaFormatted property as a string if an area is found. The formula is shown below:
If "[SubordinateAreaUnformatted]" = "*Area not found*" Then
RESULT = "-"
Else
RESULT = "[SubordinateAreaFormatted]"
End If
This property can then be added to a Schedule Table, as shown below:
That is all well and fine if all you want to do is display the subordinate area in a Schedule Table. But what if you wanted to be able to have the Area as a numeric value, with which you could do some calculation? The same limitations encountered above will apply, and the solution used in the sample file is to accept that the Location property will have to be converted to a string to avoid an error in the formula, then to take that string and convert it into real number. In the sample file, this is handled by two separate Formula properties; you could easily combine them into one Formula property that does it all. The SubordinateAreaModified02 Formula property looks remarkably similar to the previous one, with the exception that the result when an Area is not found is "0.0" rather than "-" and the unformatted Location property is used. That is because we want to convert these values to real numbers, and non-numeric characters will cause an error.
If "[SubordinateAreaUnformatted]" = "*Area not found*" Then
RESULT = "0.0"
Else
RESULT = "[SubordinateAreaUnformatted]"
End If
The text values of the property would appear like the image below, if it were added to a Schedule Table.
The SubordinateAreaReal Formula property takes the value of the SubordinateAreaModified02 Formula property and uses the CDbl function to convert the strings to real numbers. Be aware that if you pass a string that contains any non numeric characters, other than an initial minus sign or a decimal point, using CDbl will result in an error. That is why the unformatted version of the Location value is used in the SubordinateAreaModified02 Formula property. The image below shows this property in a Schedule Table.
CDbl ( [SubordinateAreaModified02] )
A combined Formula property, not included in the sample file, might look something like this:
If "[SubordinateAreaUnformatted]" = "*Area not found*" Then
RESULT = 0.0
Else
RESULT = CDbl( "[SubordinateAreaUnformatted]" )
End If
Now that we have a real number value, we can do math! [Trust me, that is a good thing.] Suppose that for rental purposes, the area of the balcony gets included at 75% of its actual area, along with the main area. The TotalAreaUnformatted Formula property is a simple, one-line calculation that does just that, and leaves the result unformatted should there be a need to do further mathematical operations on the result.
[BaseAreaUnformatted] + ( 0.75 * [SubordinateAreaReal] )
The TotalAreaFormatted Formula property simply passes through the value of the TotalAreaUnformatted property, applying the Area Property Data Format to it. If you are not going to include this value in a Schedule Tag, you could omit this property and use the TotalAreaUnformatted value as a column in your Schedule Table Style, changing the Property Data Format for the column to Area. The image below shows the formatted value in a Schedule Table.
You can click on the image below to see a larger version of the entire table, with some explanatory text below each column, or download the sample file from the Discussion Group thread and look at it live.
Labels:
Formula,
Location Property,
Schedule
February 13, 2007
AutoCAD Architecture 2008
The 2007 release of Architectural Desktop will be the last - under that name. Those interested in an overview of the features in the newly christened AutoCAD Architecture 2008 may want to read this press release from Autodesk. You can also keep tabs on the 2008 rollout [and even sign up for e-mail notification or set up an RSS feed] at the Autodesk Preview 2008 site.
February 08, 2007
Creating a Wall Style with Actual Masonry Widths
The imperial masonry wall styles that ship with ADT use nominal dimensions for the masonry components; for example, an 8" CMU component is given a width of 8". Some may prefer to have the actual component widths used, 7 5/8" for the 8" CMU noted previously. A question came up in a thread in the Autodesk Architectural Desktop Customization Discussion Group from someone setting up such a wall style, having started from one of the out-of-the-box styles. After changing the widths of the masonry components, as well as reducing the Air Gap to 1", the wall endcap did not appear as desired. I posted a response and a sample file illustrating the need to create a new wall endcap style for the modified wall style, as ADT will scale the polyline graphics used to create the endcap for each component, to suit the actual width of the component. Since the two masonry components got 5/8" narrower, the scaled-down version of the original wall endcap resulted in the masonry component endcaps being "shorter" than those for the insulation, metal furring and GWB, whose widths remained the same. Here is how I created the new wall style, wall endcap style and wall opening endcap style in ADT 2004 for the modified wall. These same concepts can be applied any time you make a copy of an existing wall style and modify the widths of one or more components.
I used the out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring wall style as my starting point, using the Style Manager to copy it from the out-of-the-box source file to a new file started with an ADT template file. I then copied and pasted that style in the new drawing file, renaming the style to CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring and editing the description of the wall style to match the planned changes. I also copied the associated CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1) wall endcap style and CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1)(2-Sided) wall opening endcap style to create the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring (End 1) wall endcap style and the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring (End 1)(2-Sided) wall opening endcap style, respectively. I edited the new wall opening endcap style to reference the new wall endcap style at the jamb start and jamb end. I then edited the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring wall style and assigned the new wall endcap style and new wall opening endcap style on the Endcaps / Opening Endcaps tab as shown in the image belowand edited the widths and offsets of the components on the Components tab, changing the widths of the Brick to 3 5/8", the Air Gap to 1" and the CMU to 7 5/8" and the offsets to coordinate, as shown in the image below. You can also see my preference for using engineering units rather than architectural units; I believe that the file I posted is set to architectural units.Note that even though new endcap/opening endcap styles were created and assigned, the actual endcap remains identical to the original, out-of-the-box version. I created the copies and assigned them up front in order to make it easy to generate the new endcap style using the Endcaps > Calculate Automatically option from the wall-object context [right click] menu. The default action there is to redefine the current wall endcap style, so by having a placeholder style with the desired name already in place, I need only to say "Yes" to the prompt and I am done.
The image below shows one end of a wall drawn with the original, out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring wall style, with the polylines that define its wall endcap style positioned just above the end and a dimension string showing the widths of the various components. I generated the polylines using the as Pline option of the WallEndcap command. This typically inserts the polylines all "bunched up" and oriented for the right side of a horizontal wall; I rotated the polylines and lined them up relative to each one's respective component.
The next image shows what a wall using the new CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring wall style but with the out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1) wall endcap style would look like. Notice that the ends of the Brick and CMU components are inset from the ends of the other components, due to the scaling of the defining polylines to match the reduced widths of those components. This is the condition that the new wall endcap style will need to address.
The final image shows the new wall style with the new wall endcap style. I copied the polylines from the original, out-of-the-box wall endcap style, then edited the polylines for the Brick and CMU components to reflect the modified component widths and moved them all to properly align with the wall components. I also copied and modified the dimension string, to show the changes in the example file and in the image below. Finally, I selected the wall, right clicked, and chose Endcaps > Calculate Automatically from the context menu. Following the prompts on the command line, I selected the polylines, chose not to erase them [as I wanted to keep them for the sample file - you may want to delete them if you are certain they are correct, or keep them and erase them later after you are certain the endcap is correct], said "Yes" to modify the current endcap style [but only do so if you have already assigned a new wall endcap style to the wall, as noted above - otherwise you would be changing the wall endcap style assigned to the original wall style, which would likely not be something you want to do] and asked that the "new" [modified] wall endcap style be applied as the wall style default. And that is it - except for editing the end of the example wall back to its original position, as I had the polylines in the position shown when I updated the wall endcap style, and ADT will extend the wall to align with the polylines when the WallAutoEndcap command ends. WallAutoEndcap, by the way, is the command that is executed by the Calculate Automatically menu choice; if you are allergic to the context menus or prefer to set up a tool palette tool, toolbar tool or a keyboard short cut to initiate the Calculate Automatically process, WallAutoEndcap is the command you will need to reference.
Download the sample file I posted in the Discussion Group thread if you want to see it live.
I used the out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring wall style as my starting point, using the Style Manager to copy it from the out-of-the-box source file to a new file started with an ADT template file. I then copied and pasted that style in the new drawing file, renaming the style to CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring and editing the description of the wall style to match the planned changes. I also copied the associated CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1) wall endcap style and CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1)(2-Sided) wall opening endcap style to create the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring (End 1) wall endcap style and the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring (End 1)(2-Sided) wall opening endcap style, respectively. I edited the new wall opening endcap style to reference the new wall endcap style at the jamb start and jamb end. I then edited the CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring wall style and assigned the new wall endcap style and new wall opening endcap style on the Endcaps / Opening Endcaps tab as shown in the image belowand edited the widths and offsets of the components on the Components tab, changing the widths of the Brick to 3 5/8", the Air Gap to 1" and the CMU to 7 5/8" and the offsets to coordinate, as shown in the image below. You can also see my preference for using engineering units rather than architectural units; I believe that the file I posted is set to architectural units.Note that even though new endcap/opening endcap styles were created and assigned, the actual endcap remains identical to the original, out-of-the-box version. I created the copies and assigned them up front in order to make it easy to generate the new endcap style using the Endcaps > Calculate Automatically option from the wall-object context [right click] menu. The default action there is to redefine the current wall endcap style, so by having a placeholder style with the desired name already in place, I need only to say "Yes" to the prompt and I am done.
The image below shows one end of a wall drawn with the original, out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring wall style, with the polylines that define its wall endcap style positioned just above the end and a dimension string showing the widths of the various components. I generated the polylines using the as Pline option of the WallEndcap command. This typically inserts the polylines all "bunched up" and oriented for the right side of a horizontal wall; I rotated the polylines and lined them up relative to each one's respective component.
The next image shows what a wall using the new CMU-7.625 Rigid-1.5 Air-1 Brick-3.625 Furring wall style but with the out-of-the-box CMU-8 Rigid-1.5 Air-2 Brick-4 Furring (End 1) wall endcap style would look like. Notice that the ends of the Brick and CMU components are inset from the ends of the other components, due to the scaling of the defining polylines to match the reduced widths of those components. This is the condition that the new wall endcap style will need to address.
The final image shows the new wall style with the new wall endcap style. I copied the polylines from the original, out-of-the-box wall endcap style, then edited the polylines for the Brick and CMU components to reflect the modified component widths and moved them all to properly align with the wall components. I also copied and modified the dimension string, to show the changes in the example file and in the image below. Finally, I selected the wall, right clicked, and chose Endcaps > Calculate Automatically from the context menu. Following the prompts on the command line, I selected the polylines, chose not to erase them [as I wanted to keep them for the sample file - you may want to delete them if you are certain they are correct, or keep them and erase them later after you are certain the endcap is correct], said "Yes" to modify the current endcap style [but only do so if you have already assigned a new wall endcap style to the wall, as noted above - otherwise you would be changing the wall endcap style assigned to the original wall style, which would likely not be something you want to do] and asked that the "new" [modified] wall endcap style be applied as the wall style default. And that is it - except for editing the end of the example wall back to its original position, as I had the polylines in the position shown when I updated the wall endcap style, and ADT will extend the wall to align with the polylines when the WallAutoEndcap command ends. WallAutoEndcap, by the way, is the command that is executed by the Calculate Automatically menu choice; if you are allergic to the context menus or prefer to set up a tool palette tool, toolbar tool or a keyboard short cut to initiate the Calculate Automatically process, WallAutoEndcap is the command you will need to reference.
Download the sample file I posted in the Discussion Group thread if you want to see it live.
February 02, 2007
Steve Bennett On Multi-Site Deployment
Steve Bennett has started a series on deploying ADT at a firm with multiple sites in his 2D or not 2D blog. You may find the two articles currently posted of interest:
How to deal with 300 users that all want it their way - Part 1
How to deal with 300 users that all want it their way - Part 2
Be sure to check his blog later for the promised Part 3.
How to deal with 300 users that all want it their way - Part 1
How to deal with 300 users that all want it their way - Part 2
Be sure to check his blog later for the promised Part 3.
February 01, 2007
Free Software - Autodesk Design Review
In case you somehow managed to miss all of the other blog articles about this, Autodesk is now offering Design Review [formerly DWF Composer] as a free download. Get your copy here.
Subscribe to:
Posts (Atom)