September 01, 2008

Layer Standards in AutoCAD® Architecture

It has been some time since I had any personal involvement in the editing of a Layer Standard, but in the past few weeks there have been a number of inquiries in the Autodesk Discussion Groups about Layer Standards. In my previous blog post, I was intending to provide a link to Matt Dillon’s Brain Dump on the subject (along with Layer Key Styles and Layer Key Overrides) that Chris Yanchar had collected and made available to all, most recently via his blog, when I discovered that the links on that page no longer worked. Being the pack rat that I am, I have copies of all of the old Brain Dumps on various hard drives and other storage devices, so I am not personally affected by this "loss". But having gotten my start in Layer Standards from that Brain Dump (thanks, Matt!) and having spent a good deal of time four or so years ago tweaking the Layer Standard and Layer Key Style that my office uses, I have a soft spot in my heart for that particular Brain Dump. Anyone wishing to jump in Mr. Peabody’s Wayback Machine can read the original Brain Dump post and the subsequent discussion in this thread in the Autodesk Discussion Groups.

I still have no idea how Chris Yanchar’s "reply" got posted "before" Matt’s initial post (there would not have been anything to print before Matt posted), especially since that was before he became an Autodesk employee. The interface for editing Layer Standards has not changed significantly since ADT 2, so if you want to run through Matt’s tutorial, in Step 2 change "Desktop->Layer Management->Layer Manager" to "Format->Layer Management->Layer Manger…" to open the Layer Manager Dialog, and then click on the Layer Standard button on the far left of the toolbar in that dialog to open the Layer Standards dialog and you are good to go.

Before I totally forget what I learned from both Matt and my own ventures into Layer Standards, and to partially rectify the loss of the nicely formatted version of the Brain Dump that had been available, I thought it might be worthwhile to put together a blog post on the subject. Even if you intend to make use of the out-of-the-box Layer Standard most appropriate for the area of the world in which you work, understanding how that Layer Standard works will be helpful, particularly if, like the AIA Version 3 Layer Standard, not all of the officially sanctioned field values for all disciplines are included in the out-of-the-box Layer Standard.

Layer Standard Overview
First, a brief overview of what a Layer Standard does (and does not) do. A Layer Standard is a way of defining a layer naming convention in which the layer name is composed of consistent "Descriptive Fields," or sub-sections. In an AutoCAD Architecture Layer Standard, you first define Component Fields, which are the smallest units that make up a layer name. One or more of these Component Fields are then combined into Descriptive Fields, which are the building blocks the user will see. These Descriptive Fields will be the fields from which you make a "New Layer from Standard" in the Layer Properties Manager or in the Layer Name dialog when assigning a Layer Name to a Layer Key in a Layer Key Style as well as those to which you assign Layer Key Overrides. Once you have defined the Descriptive Fields, you can "Edit Descriptions," where you can enter allowable values for each of the Descriptive Fields and enter a description. These values become the values that you can select when building a layer name in the Layer Properties Manager or in a Layer Key Style, and the descriptions can be made part of the layer description that shows in the Description column of the Layer Properties Manager. Finally, you can specify which fields should be included in that layer description, and provide any linking text to appear before each field’s description. The Layer Standard does not define any layers, but does contain the rules for creating layer names that comply with the Layer Standard, as well as pre-defined field values to speed the creation of a new layer name. The Layer Standard also does not prevent you from creating a non-compliant name, but it will not allow such a layer name to be associated with that Layer Standard.

Analyzing Your Layer Naming Convention
The first step, before you venture into creating a Layer Standard of your own, would be to analyse your layer naming convention and determine if you can break your layer names into separate fields, and then determine what rules apply to each of the fields. If the way you name your layers can not be broken down into separate fields with predictable positioning and lengths, then a Layer Standard is not for you. I will do this with the out-of-the-box AIA Version 3 Layer Standard, since that is the standard with which I am most familiar, with apologies to those from other areas where a different Layer Standard and associated Layer Key Style is the norm.

The AIA Version 3 Layer Standard can be broken down as follows:

Discipline Designator: A one- or two-alphabetic-character field that designates the discipline associated with that layer. The first, required character designates the discipline, and the optional second character designates a sub-discipline within the main discipline.

Major: A four-alphabetic-character field designating the "major" building system to which the layer applies.

Minor 1: A four-character field designating a "minor" building sub-system or other layer modifier to which the layer applies.

Minor 2: A four-character field designating a second "minor" building sub-system or other layer modifier to which the layer applies.

Status: A single-character field designating the construction "status" of the layer (new work, existing to demolish, existing to remain, phase number, etc).

Importing/Creating New Layer Standards in 2009
If you intend to either examine the out-of-the-box Layer Standards or create a new one from scratch and you are working in AutoCAD Architecture 2009 (and, possibly AutoCAD ® MEP, although I have no access to that to find out if the same issue takes place there as well), take a look at this blog article regarding the need to do something in the Layer Properties Manager to trigger all other pending changes, such as importing or making changes to Layer Standards, in order to get them to be saved. You do not want to lose work you thought would be saved to this bug in 2009.

Speaking of out-of-the-box Layer Standards, in the default installation, the source files can be found in the C:\Documents and Settings\All Users\Application Data\Autodesk\ACD-A 2009\enu\Layers folder; your content location may be different, if your installation modified the location of content folders. AecLayerStd.dwg contains the AIA (256 Color) Layer Key Style and associated AIA Version 3 Layer Standard, as well as several United Kingdom and German Layer Key Styles and Layer Standards. Depending upon what country-specific content you may have chosen to install, you may also have additional AecLayerStd*.dwg files that include country-specific standards. I believe I installed all of the content available on the 2009 DVD I got, and have files for the Denmark, Finland, Norway, Sweden and the UK. There may be other country- or region-specific standards files that are made available in those countries and regions as well.

While you are learning about this feature, I would not recommend editing the out-of-the-box styles in any of the source files. Either import them into a new file (in 2009, remember to add/delete a new layer prior to selecting OK in the Layer Properties Manager to save the imported Layer Standards properly) or make a copy of the source file under a different name in a different folder. You can then poke at them to your heart’s content, knowing that any changes you make (for better or worse) will only affect those standards in that single file.

Creating and Editing a Layer Standard
Once you have broken down your layer naming convention and thought about some rules with which each field is to comply, you can create a new Layer Standard and set it up with the fields and rules to suit. For those whose aim is simply to understand Layer Standards better, and perhaps to edit an existing one, open a file that has a Layer Standard in which you are interested, and jump in at Step 5 ("edit") below. Note that the dialog names, pulldown menu directions and screen captures are based on AutoCAD Architecture 2009; there may be minor variations in previous versions, but you should be able to follow along.

  1. Start a new drawing file. If you intend this to eventually become your official Layer Standards file, you may want to start the file "from scratch" to minimize the amount of extraneous items in the file.
  2. Open the Layer Properties Manager (Format > Layer Management > Layer Manager… from the pulldowns) and select the Layer Standards button at the far left of the Layer Properties Manager toolbar.
  3. This will open the Layer Standards dialog. You may find one or more Layer Standards already listed in the list box. One may have been imported, along with your default Layer Key Style, from the "auto-import" file specified on the Layering tab of the Drawing Setup dialog, or, if you started from a template file, the Layer Standards present may exist in the template file. We will ignore any in that list at this time, and select the New… button.
  4. The Create Layer Standard dialog will appear. Type a name for your standard in the Name of Standard edit box. For the purposes of this blog article, "My Standard" will be the name of the newly created standard (without the quotation marks). You will want to devise a more meaninful name for a Layer Standard you intend to use. Note the Based On toggle – if there is at least one Layer Standard defined in this file and you check this toggle, the dropdown list to the right will become active and you can choose from the available Layer Standards. A copy of the settings of the chosen Layer Standard will be made under your new name. Use this method if you want to modify an existing Layer Standard while retaining the original version. To start with a clean slate, leave the Based On toggle unchecked. The screen captures that follow will be based on starting from scratch. Select OK.
  5. The Layer Standards dialog will now include your new standard in the list box, and it will be selected. To edit any standard, select it from the list and choose the Edit… button.
  6. This will open the Layer Standard Properties dialog, which is where you will enter or modify all of the data associated with your standard. If it is not already selected, choose the Component Fields tab.As mentioned in the overview, Component Fields are the basic building blocks of a Layer Standard. Here is where you will set the rules for the Layer Standard being edited, based on the analysis of your layer naming convention. As shown above, when starting from scratch there is a Component Field named "Default value" with some initial values for the various properties associated with that Component Field. By clicking on the Field Name or any of the properties associated with it, you can edit the values. Some items must be selected from a popup menu, others will allow you to type in a value.

  7. Click on the "Default value" name and change it to the name of your first Component Field. In my example here, I will be recreating the AIA Version 3 Layer Standard. The items identified in the breakdown of that Layer Standard above constitue the Descriptive Fields, which, as noted in the overview, are composed of one or more Component Fields. You will have to decide whether any of your Descriptive Fields require more that one Component Field. The first item in that standard is the "Discipline Designator," and it is composed of two Component Fields. This Descriptive Field can be either one or two characters in length; by making each character a separate Component Field, it makes it easier to make the second character optional, and, as we will see, creates a tiered hierarchy for the pre-entered values and descriptions, making it easier to scroll through the main (first character) disciplines, then expand that item if a sub-discipline (second character) is also desired. So my first Component Field is Discipline Designator 1, with the properties shown in the image below.Each Component Field has the following properties:
    • Field Name: The name of the Component Field, which will be used to place it in a Descriptive Field when we get to the next tab.
    • Optional: This determines whether or not this Component Field must appear in the eventual layer name. The Discipline Designator Descriptive Field is required to have at least one character, so the Discipline Designator 1 Component Field is required. Be careful with this one, as I have had problems in the past when I tried to make the final Descriptive Field from a Component Field that was not optional, following two other Descriptive Fields made from Component Fields that were optional. Layers that "met" the standard but which omitted the optional field were interpreted as not meeting it, and I believe this was because the final field, which had a different number of characters than the optional fields, was being misinterpretted as one of the optional fields. Whatever the cause back then, be certain to test your Layer Standard before deploying it, to be certain it works for all of the different layer names you expect to use and have recognized as complying with the standard.
    • Max Width: Specify the maximum width of the Component Field here. Discipline Designator 1 has a maximum width of 1.
    • Fixed Width: The width of Discipline Designator 1 Component Field is fixed.
    • Wildcard: Any valid AutoCAD wildcard string can be used to limit the types of characters that can be used for the Component field. The popup list can be used to select Alpha, Numeric, Any or Other. Alpha and Numeric will generate the appropriate wildcard string based on the maximum width and whether the width is fixed to limit entered characters to alphabetic or numeric, respectively. Any will set the Wildcard to "*", allowing any character types. Other opens the Default value dialog box that allows you to enter a custom wildcard string. The "@" character in the wildcard for Discipline Designator 1 means that only alphabetic characters will be considered a match for this field. Multiple wildcard strings can be included, by separating them with commas. I suspect that the reason for the second string of "@@" – even though this field is fixed at one character in width - is that the Descriptive Field in which it appears includes another, optional, single-character, fixed width Component Field and that the two-character string is needed so that when both characters are used in the Descriptive Field, the layer is considered matching the wildcard. That is a guess on my part, but I did end up with a similar wildcard in the Layer Standard I put together, and I am certain I tried to get away with the equivalent of just "@". You can find a detailed description of the wildcard options supported by AutoCAD in the description of the wcmatch function in the AutoLISP Reference section of the Help. Access this from the main Help by selecting the Contents tab, expanding the AutoCAD Help node and selecting the AutoLISP, Visual LISP, and DXF node. Select the AutoLISP Reference link in the right pane to open the Developer Documentation to the AutoLISP Reference section. Select the "W" link in the right pane there, and then select the wcmatch link and scroll down to see the description of the various wildcard characters and see examples of their use.
    • Match Description: If you want to limit values for this Component Field to those entered on the Edit Descriptions tab for the Descriptive Field to which the Component Field is included, then set this to Yes. I have had problems with setting this to Yes in the past, so be certain to test your Layer Standard if you choose to set this to yes. Discipline Designator 1 is set to No.
    • Delimiter: You can specify a separator to divide Component Fields in this property. Supported delimiter characters are "$", "-" (hyphen), "_" (underscore) and "None" (all without the quotation marks). The specified delimiter appears BEFORE the Component Field to which it is assigned, so since the Discipline Designator 1 Component Field will be first in the layer name, the Delimiter is set to None.
    • Default: Non-optional fields can have a default value specified. These values will be the initial values that appear when creating a layer name based on the Layer Standard. You can add default values to optional Component Fields, as the AIA Version 3 Layer Standard does, but default values will not show up as the initial value for any optional Component Field.

  8. Add additional Component Fields choosing the Add above the selected item button (upward pointing arrow icon) to add the new Component Field above the selected one or the Add below the selected item button (downward pointing arrow icon) to add the new one below the selected one.If you select a Component Field prior to selecting the Add above or Add below button, the new Component Field will be added immediately above or below the selected one and will inherit the properties assigned to the selected property. If no Component Field is selected, the new field wil be added at the top of the list or the bottom of the list, and will have the same properties as the initial "Default value" field had. While it may not actually matter, it is probably best to end up with the Component Fields in the order in which they will appear in the layer name, first at the top and last at the bottom. It will certainly make creating the Descriptive Fields easier, as the popup list from which you choose the Component Fields will list the Component Fields in the order they appear on the Component Field tab. Should you need to, you can select a Component Field and selected the Delete button to remove a Component Field and its settings from the list. The balance of the Component Fields for My Standard are shown in the image below.A side note for those who use the US National CAD Standard: when I set up my firm’s Layer Standard, I set the Major Field wildcard to "[~.][~.][~.][~.]" instead of "@@@@". Unless things were changed after Version 2 (I have not seen any of the more recent versions), while the description of the Major field stated that only alphabetic characters were permitted, one of the Major fields listed under the Fire Protection discipline – "CO2S – CO2 System" – included a numeric character. The period character in a wildcard string matches any character that is both non-alphabetic and non-numeric. The tilde character, when first in a wildcard string, matches any string that does not match the pattern that follows the tilde. Square brackets are used to enclose a list of characters that a single character can be. So any four-character string composed entirely of alphabetic or numeric characters will match my string, allowing "CO2S" to match.

  9. Now we need to build the Descriptive Fields from the Component Fields. Select the Edit Descriptive Fields tab and verify that the name of your Layer Standard is shown in the Layer Standard dropdown list. You can assign up to eight Component Fields to a single Descriptive Field. When starting from scratch, there will be an initial "Default value" Descriptive Field, with no Component Fields assigned.
  10. Select the "Default value" Field Name, and enter the name of the first Descriptive Field in you layer naming convention. For my example, this will be "Discipline Designator". Now left click in the Component 1 column to the right of the Discipline Designator name, and choose the name of the Component Field that is to be assigned to this Descriptive Field from the context menu. In my example, this is the Discipline Designator 1 Component Field.To assign additional Component Fields to the same Descriptive Field, click in the next available component column and choose the appropriate Component Field. The Discipline Designator Descriptive Field in my example is composed of two Component Fields, so I added the Discipline Designator 2 Component Field to the Component 2 column.Notice that the Discipline Designator 1 Component Field is grayed out on the context menu. That item is no longer available because it has already been assigned. If you choose a Component Field in error, you can left click on it and choose Delete from the context menu to remove it.

  11. The Delete, Add above and Add below buttons work the same way on the Edit Descriptive Fields tab as they do on the Component Fields tab. Use them to add Descriptive Fields to complete your layer naming comvention. On this tab, order does matter; the top Descriptive Field will appear first, with each Descriptive Field below following it, in order, with the bottom Descriptive Field at the end. The balance of the Descriptive Fields in my example have one Component Field each, and the name of each Descriptive Field matches that of the Component Field (with a space added before the numeral in the "Minor 1" and "Minor 2" Descriptive Fields. That is not necessary, but if there is a relationship between the names of the Component Fields and the Descriptive Fields, it will make remembering what your intent was easier should you need to come back to this some time in the future.
  12. You have now defined your Layer Standard, and can now add values and layer descriptions for each value for each of your Descriptive Fields, if desired. To do so, select the Edit Descriptions tab and verify that the name of your Layer Standard is shown in the Layer Standard dropdown list. Use the Field to Edit dropdown list to choose the Descriptive Field to which you will be adding values. The default values you provided on the Component Field tab should already appear in the edit box, but there will not be any layer description assigned to these.
  13. To edit an existing entry, select the entry and choose the Edit button. The Edit Description dialog will appear, and allow you to edit the Value and the layer Description, with the exception of any default values specified on the Component Fields tab, in which case you will only be able to edit the layer Description.The gray background on the Value edit box for the "A" Discipline Designator for my sample indicates that this is a default value. In order to edit this value, you would need to change it on the Component Fields tab. Note also the "+" sign in front of the "A" value in my example. As you may recall, the Discipline Designator Descriptive Field is composed of two Component Fields, Discipline Designator 1 and Discipline Designator 2, with the second part being optional. Descriptive Fields with two or more Component Fields assigned will be appear on the Edit Descriptions tab in a tree hierarchy. By selecting the "+" in front of the "A," the "A" heirarchy is expanded, revealing the next level down, and changing the "+" to a "-", allowing you to collapse that level.Because "D" was specified as the default value for the Discipline Designator 2 Component Field, a value of "AD" already appears here, waiting for a layer Description to be added, using the Edit button as before.Keep in mind that the layer Descriptions you enter for each Value can become part of the automatically generated Description that appears in the Layer Properties Manager for a created layer that complies with your Layer Standard, so make them descriptive, but keep them as brief as possible. Also note that while there is a hierarchy when multiple Component Fields are assigned to a single Descriptive Field, the layer Description is not hierarchical – for example, the "Architectural" entered for "A" does not automatically get applied to the layer Description of "AD"; that had to be typed in all over again. You may want to have a Notepad window open to allow you to copy and paste Description parts to avoid having to do a lot of repetitive typing.

  14. To add a new Value, select the Add button. You will get the Add Description dialog, with an edit box for the Value of each Component Field assigned to the Descriptive Field being added, along with one for the layer Description. Enter value(s) as necessary to add the desired new value.If you intend to add multiple new Values, you can select the Apply button to register a particular Value and Description combination, then change the text entered in the edit boxes to suit the next Value and Description combination. This can also reduce the need for retyping if successive Values share some of the layer Description text. If any of the Component Fields are optional, you can clear any value in the associated edit box. In my example, this would allow you to enter a new Discipline-Designator-1-only value with a Description, in the same Add Description dialog use.You could also add a new Value that has a Discipline Designator 1 value that had not previously been entered along with a Discipline Designator 2 value, and a node showing only that new Discipline Designator 1 value will be created, but the Description for that would be an empty string.You can always go back after you are done adding descriptions and edit any such nodes to add a Description string to them. Note also that when a Descriptive Field contains more than one Component Field and you add a new value to the first Component Field, even if you also add values to the Component Field(s) that follow and choose Apply, only the node for the first Component Field will appear in the edit box; it will not be expanded. To expand the node, or simply to exit the Add Description dialog, select OK to accept the last value entered or Cancel to exit without adding the current values.

  15. To add or edit Values for a different Descriptive Field, change to that Descriptive Field using the Field to Edit dropdown list at the upper right corner of the Edit Descriptions tab.How many Values and layer Descriptions to enter for each Descriptive Field is up to you. I would suggest adding all of those you expect to use for your firm’s standard layers for the Descriptive Fields that you include in the Description Specification (see below), so that you get "proper" layer descriptions built automatically for your firm’s standard layers. It will also make it easier for users to build new layers using officially sanctioned parts. If you entered "Yes" in the Match Descripition column any of your Component Fields, you will want to enter all allowed Values, as any omitted Values will not be able to be entered and have the layer accepted as complying with the Layer Standard.

  16. The last thing to do before completing the first draft of your new Layer Standard is to select the Descriptive Specification tab and verify that the name of your Layer Standard is shown in the Layer Standard dropdown list.. This is where you indicate which Descriptive Fields contribute to the automatic layer description, and how that is formatted.There are two columns in the list box for this tab. The Prior Text column lets you add fixed text before a selected Descriptive Field, and the Field column allows to select from a popup list of the available Descriptive Fields. On this tab, you can use a given Descriptive Field more than once, but you do get a reminder in the popup list of which fields have already been used, as it is likely you would only want to use each one once. The Delete, Add above the selected item and Add below selected item buttons work the same way they do on the Component Fields and Edit Descriptive Fields tabs, but this time there is no default value if you started a new Layer Standard from scratch. To add the first Field, select either the Add above or Add below button.The first Descriptive Field in your Layer Standard will be initially selected in the Field column, but you can change it if you want by left clicking the Field name and choosing from the list. If you do not want any text added before this field, select the default "New" value in the Prior Text column and leave the column blank. Add additional Fields, with any desired Prior Text, as you see fit for your Layer Standard. In my example, all of the Descriptive Fields are included in the Descriptive Specification. No Prior Text is added before the initial Discipline Designator Field, but that Field is separated from the Major Field that follows by a space, a hyphen and a space. A comma and a space separate the Major Field from the Minor 1 Field, a single space separates the Minor 1 and Minor 2 Fields and a space, hyphen, space separates the Minor 2 Field from the Status Field. If you have Descriptive Fields that are composed of one or more optional Component Fields, and a particular layer name omits that Descriptive Field, then the Prior Text assigned to that Descriptive Field will not be included in the layer description.
  17. To see the Values, layer Descriptions and the Descriptive Specification in action, select OK in the Layer Standard Properties and Layer Standards dialogs to return to the Layer Properties Manager. Select the New Layer from Standard button on the Layer Properties Manager toolbar (eleventh from the left, between the New Layer and New Layer VP Frozen in All Viewports buttons) to open the New Layer From Standard dialog. At the top, make certainthat your new Layer Standard is selected as the Layer Standard. The list box should list your Descriptive Fields in the Field column, with the default values you specified for any non-optional fields in the Value column, and their associated layer Description strings in the Description column. The current Layer Name appears, with delimiters, if you specified any, in the Layer Name edit box, and the current Description that will be automatically associated with the layer will be shown in the Description edit box.Use the elipsis buttons at the right side of the Value column to change or add values to each Descriptive Field from a list of pre-specified values.Notice that as you add each pre-specified value, the description you associated with it gets added to the Description edit box, in the format you specified on the Descriptive Specification tab for your Layer Standard.A few sample layers, using the example Layer Standard I put together, can be seen in the image below, including a layer with a value for all of the Descriptive Fields and two that omit one or more optional fields.
Now that your first draft is complete, be certain to test it out and make certain that it performs as expected. This is particularly critical if you have specified that one or more Component Fields must "match description" or if you have tried to have Descriptive Field composed entirely of non-optional Component Fields come after one or more Descriptive Fields composed entirely of optional Component Fields.

August 31, 2008

AutoCAD® Architecture 2009 Layer Properties Manager Alert

In developing my future post on Layer Standards, I have noticed that in the 2009 release, any changes made to the Layer Standard, Layer Key Styles or Layer Key Overrides when accessed through the Layer Properties Manager (the ClassicLayer, modal dialog, not the non-modal palette version, which does not have access to the ACD-A layer features) will NOT be saved if these are the only changes being made during that session of the Layer Properties Manager. While less critical for Layer Key Styles and Layer Key Overrides, since these can be accessed outside of the Layer Properties Manager, this is quite serious for Layer Standard changes (imports from other files, creation of new Layer Standards or edits to existing Layer Standards), since the only way to do these is through the Layer Properties Manager.

Fortunately, there is a workaround for this: after completing your Layer Standard, Layer Key Style or Layer Key Override changes from the Layer Properties Manager, before selecting OK, do something directly within the Layer Properties Manager that will result in the Apply button becoming active. My personal favorite is to select the New Layer button, and simply add the default layer (Layer1 if it does not already exist). If you like, you can immediately delete this newly added layer, and then select the OK button.

From what I can tell, it appears that changes made to Layer Standards, Layer Key Styles and Layer Key Overrides from the Layer Properties Manager are being held in a "pending queue" without being applied to the drawing (in memory) when selecting OK in the dialog(s) launched from the Layer Properties Manager toolbar buttons. This would allow for possible remorse while the Layer Properties Manager is still active - I have no problem with those changes being discarded if I select the Cancel button in the Layer Properties Manager. Unfortunately, unlike previous versions, the 2009 Layer Properties Manager dialog starts out with the Apply button disabled, and not only does it not become enabled when a change is made to a Layer Standard, Layer Key Style or Layer Key Override through the Layer Properties Manager, these pending changes also do not appear to trigger the need for acceptance should the OK button be selected. Making a change in the Layer Properties Manager itself does activate the Apply button and also sets something that activates all pending changes when either the Apply or OK buttons are used.

While this should not be necessary, until it is fixed, creating and deleting a bogus layer is a relatively small act to preserve what could be many minutes (hours?) of editing a Layer Key Style or adding descriptions to a Layer Standard.

August 26, 2008

Layer Standard and Layer Key Style

The automatic layering feature of AutoCAD® Architecture has two components. Most will be familiar with the Layer Key Style, which allows you to specify on what layer a particular AEC item will be placed. The other component is the Layer Standard. While not strictly necessary (a Layer Key Style can be set to Non Standard), having a Layer Standard offers some advantages over not having one.

If the layer names you use do not have any consistent format (random lengths, not broken into subsections with consistent meaning), then a Layer Standard is not for you. If your layer names do use a consistent formatting, then you probably could create a Layer Standard that "enforces" those formatting rules. It will not prevent you from making non-standard layers, but it will make it easier to create standard layers by allowing you to pre-specify values for each field in your standard. You can also associate a description for each pre-specified value, and the descriptions of the various fields will be combined into the Description that appears in the Layer Properties Manager dialog (in the far right column). Having a field-based Layer Standard will also allow you to make use of the Layer Key Overrides feature, in which you can specify an override for one or more of the fields to create a layer name that is modified from the one specified in the Layer Key Style. This can be done globally or be set up on a tool palette tool, to be used only when that tool is used.

The interface for editing Layer Standards has not changed much over the years, and the Brain Dump Matt Dillon wrote for ADT 2 is still a great resource for becoming familiar with the ins and outs of Layer Standards. Unfortunately, the Brain Dump links listed in Chris Yanchar's Between the Walls blog no longer appear to work. I will try to put together a tutorial on Layer Standards and publish it in a future article. Until then, you can take a look at one or more of the Layer Standards that ship with the program and see how they are set up. These are based on the national or international standards prevalent in various area of the world, and it may be wise to adopt the one that applies in the area where you work, rather than to invent your own.

To edit a Layer Standard, open a file that contains one, open the Layer Properties Manager dialog and choose the Layer Standards button on the tool bar at the top of the dialog (first one on the left).

July 28, 2008

Copy/Paste and Formulas

If you have ever set up a "test" Property Set Definition to work out a Formula property, then wanted to copy and paste the final formula to a Formula property in another Property Set Definition, you may have noticed that while the text will copy and paste just fine, the all-important references to other properties get converted to inactive text. For example, suppose I wanted to copy and paste the HeightSchedule formula shown in the image below.If I simply highlight the formula text, copy it to the clipboard with a CTRL-C, and then paste it into a new Formula property with a CTRL-V, I will get the following:

While I could highlight each former reference, then double click that property in the Insert Property Definitions area to replace the text version with an active property reference, that could become tedious, particularly if there were a large number of references to replace. The following technique can ease the pain, by avoiding the need to carefully highlight each individual reference. All you need to do is start the new Formula property, add a property reference for each instance in the original formula (I like to add a few returns first)...
...and then paste the formula in front of the property references you added. You will get something like this,
where the references in the pasted formula become active, while the previous references revert to inactive text, all nicely grouped together at the end, just waiting for you to highlight them all at once and delete them.

I have no idea why this works, but it does, and can be quite a time saver. I "discovered" this one time when I was pasting part of a formula that happened to have a property reference that was also repeated later on, after the part I was pasting. I was amazed that an active property reference pasted, annoyed when I noticed that the later one had become inactive and finally thrilled when I realized I could make use of that phenomenon to make pasting formulas easier.

July 25, 2008

Update 1 Available for AutoCAD® Architecture 2009

The first "update" (formerly known as "service pack") for AutoCAD® Architecture 2009 was made available today. You can get it through "Live Update" in the Communications Center or by going to the appropriate page of the Autodesk Website. There are separate updates for the 32-bit and 64-bit variants.

June 16, 2008

Text Case and the Quantity Column

A recent thread in the Autodesk AutoCAD® Architectural Discussion Group called my attention to the fact that, like the way real numbers are evaluated when including a quantity column in a Schedule Table, text strings are also evaluated using the "raw," or input value, and not the value that results from applying the Property Data Format assigned to the property (or to the property's column in the Schedule Table Style).

So, for example, even though the Schedule Table displays your text value in all capital letters, if the data is entered in different mixes of upper and lower case letters, only those objects whose data were entered identically will be collapsed into one line. In the example files I posted to the thread noted above, I created a manual, text-type property in an object-based property set, and applied the out-of-the-box Case - Upper Property Data Format. I entered the characters, but all upper case for some and all lower case for others. I kept the Case - Upper formatting on the column in my Schedule Table Style, and even though the data appears identical in the Schedule Table, the values entered in upper case collapsed into one line and those entered in lower case collapsed into another.

Fortunately, the workarounds similar to those suggested for real numbers will also work for text values that you can not guarantee will be uniform. If you can not use a List to assure that all values are entered identically, and you have a Property Data Format that formats the text the way you want, simply set up a formula property and pass through the formatted manual property enclosed in double quotation marks. For a manual property called WindowType, the formula would look like this:
"[WindowType]"
where [WindowType] is a property reference selected from the pane below the formula editing pane.

If you need to force all upper case or all lower case text, and do not want to create or rely on a Property Data Format, then you could use the UCase or LCase VBScript functions to achieve that result, respectively:
UCase ("[WindowType]")
While you might be able to replicate sentence case or title case with a more complicated VBScript statement, I would recommend creating a Property Data Format that applies the desired format to the manual property and then pass through the value in quotation marks for either of these formats.

Keep in mind that in later releases, you can choose to not display the formula property in the Properties palette or in the Edit Property Data dialog. The user can not edit the value anyway, and omitting it here will reduce clutter as well as eliminate inquiries as to why there are two properties with what appears to be the same value. Just remember to use the formula property in your Schedule Table Style, not the manual one.

June 07, 2008

InputHistoryMode System Variable


I do a lot of keyboarding when using ADT/ACD-A, and I have grown quite used to using the up and down arrows to scroll through previously keyed in data. Unfortunately, I always forget which system variable controls this, and what setting I need to get what I want.

After a long search in the Help and on the Discussion Groups, I finally found the system variable in the Help - INPUTHISTORYMODE - and armed with that, found an old post of mine that contained the setting I prefer. I find the descriptions in the Help of the various bit settings somewhat misleading, as what I want to enable is the ability to get previous input with the up and down arrows (which the Help implies is enabled by the one bit) and get rid of the useless-to-me display of previous coordinates (which the Help implies is enabled by the eight bit). The default setting, 15, has all bits enabled, and you get the tiresome coordinates, instead of previously typed input. Clearing the eight bit, which is what I would have expected would do the trick, does not; clearing the one bit does, so my preferred value for this variable is 14.

I am making this post to my blog to make finding this information easier for me in the future; if it is helpful to others, so much the better.

May 16, 2008

Space Generation in ACD-A 2009 with AutoCAD® Object Boundaries

Several recent posts in the AutoCAD® Architecture Discussion Group have asked why AutoCAD objects can no longer be used as boundaries when automatically generating Spaces, as they could in previous releases. The good news is that you can still use AutoCAD objects, and now you have more control over which objects are seen as Space boundaries. The "bad" news is that you have to tell ACD-A 2009 which AutoCAD objects are space bounding; this is done by setting the newly added Bound space property of the AutoCAD object, found in the Advanced category on the Design tab of the Properties palette, to "Yes".
If the drawing file in which you are working has no AutoCAD objects set to bound Spaces and has no AEC objects that are capable of forming a Space boundary, you will be presented with this helpful dialog, which allows you to either make all visible objects capable of bounding Spaces, or to select the objects you want to have capable of bounding Spaces.
So you can still quickly add Spaces to any "old" file (or any new file you get from someone using vanilla AutoCAD) - just remember to set the Bound spaces property of the linework you want to use as boundaries to Yes.

May 11, 2008

Review: CADaptation’s AecBatchStylesEditorTM 2008

On April 15, 2008, CADaptation released AecBatchStylesEditorTM 2008, an application that runs inside of either AutoCAD® Architecture 2008 or AutoCAD® MEP 2008. The AecBatchStylesEditor greatly enhances the user’s ability to work with styles and definitions in these host applications, particularly when the same, or very similar, settings are required for multiple styles or definitions.

FULL DISCLOSURE: I “know” the two main people at CADaptation, Corey Layton and Brian Winterscheidt, from our mutual involvement with the Autodesk AutoCAD Architecture Discussion Groups. I served as a beta tester for AecBatchStylesEditor 2008 and received a complementary copy of the application for doing so.

AecBatchStylesEditor 2008 allows the user to perform batch edits on the Property Sets, Materials, Classifications and Display Properties associated with multiple styles or definitions. Very often, these settings are the same, or very similar, across multiple (if not all) styles/definitions of a particular object type. With AecBatchStylesEditor 2008, you will still need to create/attach the first instance of one of the previously listed items in the host program the way you do now, but you can then copy that from the style/definition where you created it to as many other styles/definitions of that object type as you like. This frees you from the drudgery of manually making the same edits over and over to multiple styles (and then checking what you did to make certain you really did the exact same thing multiple times). If you do need some minor variation between styles, AecBatchStylesEditor 2008 can get you 90% done very quickly, leaving only the variations to be manually edited. Many operations also allow you pick and choose settings from what you are copying, so you can copy just the subitems that are the same.

The following example should give you and idea of what this application can do. The CADaptation website offers a free trial version that only works on Mass Elements if you want to see the program in action for yourself.

Suppose you were working with the “new” out-of-the-box Space Styles, with their fancy colored fills in Medium Detail, but needed to have those same fills display when the Low Detail Display Configuration is set current. Unfortunately, while the color and layer set for the Low Detail Display Configuration is the same as that for the Medium Detail, the out-of-the-box settings when the Low Detail Display Configuration is chosen display a series of lines at 45 degrees, rather than the solid fill. And then, when you go to check just how those color fills were assigned, you discover that it is all done as style-level overrides! That means changing the hatch type for the Plan Low Detail Display Representation for every Space Style used in the drawing. AecBatchStylesEditor 2008 can make quick work of this tedious task. This is one of my favorite features in the application, and not just because it is the result of a suggestion I made during the beta process.

AecBatchStylesEditor 2008 provides a number of ways to start the application:
  • Tool Bar Button.

  • Tool Palette Tool.

  • Pulldown Menu

  • Typing AecBatchEdit at the Command: prompt.



In the AecBatchStylesEditor dialog, I have selected the Display Properties tab, as the change I want to make is to the Display Properties of Space Styles. The first step will be to select Space Styles in the Object Type to Edit in the upper left corner. You can also choose an object type and set a source style by using the Pick… button on the left side. If the task at hand is copying the settings from a specific style to one or more other styles, this would be the way to go. Since the sample task involves copying settings from one Display Representation to another Display Representation within each selected style, I will use the tree window to select Space Styles, under the Architectural Objects node (just like Style Manager!). This populates the rest of the tab with data and options, based on the object type selected and the styles of that object type available in the current drawing. In order to quickly select all styles as styles to edit, I entered an “*” in the Enter Selection Filter edit box (without the quotation marks). This conveniently happens to be the initial default when left clicking in the box. Select the Go button to register the filter, and all of the Space Styles within the drawing will be checked in the Styles to Edit list box at the lower left. If you wanted to, you could uncheck any that you did not wish to edit.

In the Source Display Options area in the upper right of the Display Properties tab, I checked the Copy between Display Reps within each Style to Edit. This grays out the Source Style option on the left side, because instead of one style serving as the source, the values of the source Display Representation of each individual style will be copied to the Display Representation(s) to be edited in that same style. I then chose the Plan Display Representation as the Source Display Rep, using the drop down list isn the Source Display Options Area. Doing this automatically checks the Plan Display Representation in the Display Rep(s) to Edit list. The final step is to check the Plan Low Detail Display Representation in that same list, as this is the one to which I want to copy the settings from the Plan Display Representation.

Since I want to copy all settings between the corresponding Display Representations and I want to maintain them as style-level overrides, I am done with making settings. If I wanted to be more selective, I could use the other areas on the right side of the dialog to narrow down the settings to be copied or to set up a custom mapping of settings. Selecting OK tells the application to make the selected changes, and after processing all of the Space Styles in my test drawing file, the AecBatchStylesEditor Log dialog appears, as I have the logging option enabled, on the Preferences tab. This dialog displays a listing of the changes that were made, and I can save it to a text file if I wish, for later examination. Closing the log dialog returns me to my drawing file, with an offer to save the drawing, since I also have that option enabled on the Preferences tab. More importantly, my Low Detail Display now shows solid hatches, just like the Medium Detail Display, and all 38 of the Space Styles that were in this drawing have had the Low Detail Display Representation Style-level Display Override edited to match the Medium Detail Display Representation in just a few minutes.

If the out-of-the-box Display Settings are not exactly to your firm’s liking, but you have been putting off making changes because of all of the repetitive editing that might need to be done, or if you have wanted to create new Display Configurations with new Display Representation Sets and new Display Representations, but were overwhelmed by the enormous task of making all of the settings (particularly if they are the same as the settings for an existing Display Representation for all but a few object types), then you will definitely want to take a look at what this application can do. If you make use of style-level display overrides (whether out-of-the-box or custom), you can also use this application to push any drawing-default level changes you make to components that were not the reason for the override, without having to edit each override manually. Unless you are extremely underpaid, one or two uses on what would have been complicated or repetitious tasks will save you enough time to recoup the cost of the application, and every use after that is gravy.

Another Step Closer to Eliminating Printed Documentation

The last several releases of AutoCAD® Architecture/Autodesk® Architectural Desktop have not been accompanied by printed manuals, but you could, if you so desired, order one manual per license, which would be shipped to you at no charge.

In previous years, the options were to choose between the AutoCAD manual, the Imperial Tutorial for AutoCAD Architecture/Autodesk Architectural Desktop or the Metric Tutorial. I was disappointed that a printed manual for AutoCAD Architecture/Autodesk Architectural Desktop was not a choice, but was glad to have access to a printed version of the AutoCAD manual.

For the 2009 release, there are still three choices, but the AutoCAD manual is not one of them. Instead, in addition to the usual Imperial/Metric tutorial options, the other choice is to get a copy of the ACA Getting Started manual. At first, I was thrilled to see that an ACA manual was available, but something about the name seemed familiar. A quick check of the box in which the disks for AutoCAD Architecture 2009 were shipped revealed the source of that familiarity: the booklet included with the disks is called "Getting Started" and the part number on the back, 185A1-050000-PM01A matches that on the website ordering page. (Click on any image to see a larger version; use the Back button to return here.) So unless you want additional copies of the sixty-nine page Getting Started booklet that comes with the disks, you may want to consider one of the other choices.

Given the major change to the user interface, the AutoCAD manual would have been useful. While I love being able to search the electronic Help, I am sufficiently old-school (and sufficiently old) to still value a printed manual, that I can use without having to sacrifice screen space with the application running (does everyone but me have dual screens now?) and can also peruse when I am away from the computer.

I wonder if vanilla AutoCAD users still have the option to get the full manual, or just a "getting started" booklet.