December 19, 2008

Non-Project Door Tag Using Room Number with Prefix and/or Suffix

If you are not using the Drawing Management feature (Project Browser and Project Navigator), you can still have room-number-based door numbers, and even allow for an optional prefix and/or suffix. You may have to do a little bit of setup, and create a custom Schedule Tag (or edit a copy of one of the out-of-the-box Schedule Tags), but it is really not all that hard, and the only thing that the Drawing Management feature brings (other than pre-made content) is the ability to have the room number prefixed by the Level property, which is an automatic project property. I will assume that you have dealt with that issue and have a way to assign your desired room number to each Space in a property in an object-based Property Set that is attached to each Space.

Making that room number property available to a Door is as simple as adding a Location property to an object-based Property Set that "Applies To" Doors. Location properties are best placed in object-based Property Sets. You can add one to a style-based Property Set, but unless the object already has another Location property in an object-based Property Set attached to it, the "Location grip" will not be generated and the Location property will not work. The Location grip, as seen below, is a four-pointed-star-shaped grip, that can be moved independently of the Door to which it is attached, and which will retrieve the specified property value from the first Space it finds below itself.

You can call for a Location property to return the value of any property that is in a Property Set that "Applies To" to a Space or AEC Polygon. (If you are using 2006 or earlier, Location properties also work with Area objects.) The Property Set of the referenced property must be attached to the Space or AEC Polygon in order for the Location property to return a meaningful value.

A prefix or suffix can be added by providing a manual property of the desired type. You can then display this value in a separate attribute in a Schedule Tag, as the out-of-the-box project-based Door Schedule Tag does, or by using a formula property to concatenate the prefix, room number and suffix into a single property. I have posted a sample file demonstrating how this could be done to this thread in the Autodesk Architecture Discussion Group. The DoorObjects2 Property Set in that file Applies To Door and Door/Window Assembly objects, and has the properties seen below. (Click on any image to see a larger version; use your web browser's Back button to return here.) SpaceNumber is a Location property that retrieves the SpaceObjects2:Number property that holds the room number. DoorNumberPrefix and DoorNumberSuffix are two manual properties that allow the user to add a prefix and/or a suffix to the room number value to create the final door number. The default value for each is an empty string. DoorNumber is the property that generates that final door number; it is a formula property whose formula is shown below. The formula checks the value entered into the DoorNumberPrefix property and, if it is an empty string, sets the variable doornumber1 to an empty string. If the user has entered a prefix value, doornumber1 is set to that prefix value with a period added as a delimiter, to visually separate the prefix from the room number. That part is not necessary, but some sort of delimiter may be desired if the nature of the prefixes and room numbers that you might be using could make it hard to tell if there is a prefix or not.

The formula then does a similar thing with the DoorNumberSuffix property, setting the variable doornumber2 to an empty string if a suffix was not added or to the concatenation of a period followed by the DoorNumberSuffix value, if a value was entered. Finally, the RESULT of the formula property is the concatenation of the doornumber1 value, the room number (from the SpaceNumber property) and the doornumber3 value. If no prefix or suffix is specified, then the room number is the final result, as seen at the Door in Conf 1007 in the sample plan below. The other Doors have a prefix, a suffix or both added to the room number, with the period delimeter separating any non-empty prefix or suffix from the room number.

If you want to see this in action, download and unZIP the sample file attached to my reply in the above-linked Discussion Group thread and try it out for yourself. The file was created in AutoCAD Architecture 2008, so you would need 2007 or later to be able to open the file.

November 15, 2008

Creating Annotative Tags in AutoCAD® Archtitecture

Annotative content, first added in the 2008 release, is a great feature, particulary for things like Schedule Tags – no more messing around with multiple view blocks and adding Display Representations/Display Representation Sets/Display Configurations to get a single tag to display at multiple scales. But, as you may have discovered, it can make creating a new tag, or even modifying an old one, and getting things the right size something of a challenge. Part of the confusion stems from the fact that AutoCAD and AutoCAD Architecture treat annotative content differently. AutoCAD will insert an annotative block using the current drawing scale’s scale factor to determine the final size; AutoCAD Architecture will use annotation scaling (as it did before AutoCAD added the annotative feature), a combination of the current drawing scale’s scale factor and the annotation plot size (specified on the Scale tab of the Drawing Setup dialog). Here is a method I use to make certain I get the Schedule Tag size I want, and it works whether I am drawing the graphics from scratch, inserting an existing Schedule Tag Multi-View Block and exploding it or directly inserting an existing view block and exploding it. It also works whether I use the Define Schedule Tag (AecDefineTag) or choose to build the Multi-View Block for my Schedule Tag manually.

Step 1: Set the Drawing Scale to 1’-0” = 1’=0” (or 1:1, for metric users) and the Annotation Plot Size to 1. In 2008, you can do both on the Scale tab of the Drawing Setup dialog. In 2009, you will need to set the Scale in the popup list on the Drawing Window Status Bar (or on the Application Status Bar, if you have the Drawing Window Status Bar turned off), since the Scale list on the Scale tab is only used to associate a Display Configuration with a scale, not to set the Drawing Scale.
Step 2: Create the graphics for your view block(s), keeping in mind that one unit in the block will plot at the Annotation Plot Size in effect at plot time. So if you want the property datum displayed in a particular attribute to plot at the Annotation Plot Size, make the attribute definition or text placeholder (if you are using the Define Schedule Tag wizard) one unit high. You can scale attribute definitions/text place holders up or down from one unit to get larger or smaller text in the tag, if desired. Draw any other graphics to suit. If you plan to start with the graphics from an existing Multi-View Block, you can insert an instance of it now, and it will be scaled in accordance with one unit plotting at the Annotation Plot Size, since the effective scale factor in 1 (Drawing Scale of 1 x Annotation Plot Size of 1). If you prefer to insert the view block of the tag directly, that too will insert at the proper size (Drawing Scale Factor of 1). Make the desired changes to the exploded content, or draw the desired graphics from scratch.

Step 3, Option A: Fire up the Define Schedule Tag wizard, select your graphics, convert any placeholder labels that are meant to display properties to have a Type of Property and assign the desired Property Set and Property to each. TIP: I like to to follow the out-of-the-box naming convention of using the Multi-View Block name with “_P” appended to it for the view block. The wizard will assign the same name to both the Multi-View Block for the Schedule Tag and the view block definition. I find it easier to use the view block name in the dialog, and then rename the Multi-View Block Definition in the Style Manager after it is created. Once you have everything set the way you want in the dialogselect the OK button, specify an insertion point for the Multi-View Block/view block, save the file and make a Tag tool by dragging the Multi-View Block to an editable tool palette. (For shared content, save the file as a source file in a location accessible to all, or copy the new Multi-View Block Definition to such a file, and then make the Tag tool from that file.) Set a Layer Key and make certain all of the other Properties of the Tag tool are as you desire, and you should be good to go. Reset the Annotation Plot Size back to your office standard, and set an appropriate Drawing Scale, and try out your new tag. It should come in at the expected size, and react to changes in Drawing Scale or Annotation Plot Size as expected.

Step 3, Option B: To use this option, you need to have attribute definitions with properly formatted attribute tags for each Property you want the Schedule Tag to show. Create an AutoCAD block definition for each view block you are going to assign to your tag. Fire up the Style Manager, create a new Multi-View Block Definition and add the view block(s) to the appropriate Display Representation(s) and then indicate the view directions for which each is to be visible. Exit Style Manager and save the file, or use Style Manager to copy the Multi-View Block Definition to a central source file and apply the changes. Create a Tag tool on an editable tool palette, set a Layer Key and make certain all of the other Properties of the Tag tool are as you desire, reset your Annnotation Plot Size and Drawing Scale and give it a try.

For a “simple” one-view-block Schedule Tag (as at least 90% of your tags will be, now that annotative content eliminates the need for multiple view blocks for multiple scales), Option A in Step 3 would be the way to go. Option B, on the other hand, may be useful if, for example, you have a space tag that needs to show different things for different drawing types – perhaps it shows the room name and area for schematic plans, room name and number for contract document floor plans and room name, number and ceiling height in reflected ceiling plans. Depending upon your workflow, it may be easier to have one tag that can do all of that than to have three separate tags. Of course, you could start out with Option A to get the first view block and the Multi-View Block set up, then add additional view blocks and adjust the Display Representations each block uses in the Multi-View Block as required.

October 27, 2008

Zoom To from Schedule Table Fails

I ran into an interesting problem today, and thought I might spare others the time it took me to sort it out by sharing the problem and the solution. I was taking a floor plan that was developed for a project and making the first "contract document" pass at the Doors in the file, with the goal of getting them "schedule ready." Those working on the file before me had tagged some of the doors; others had the property sets attached without being tagged. I dropped in a Schedule Table to see what Doors were in the file and the state of each one.

I had several Doors that did not have the Property Sets attached, and rather than using the Add All Property Sets option available on the Schedule Table context menu, I decided to use the Selection > Show feature to zoom to each door and determine if it should be in the schedule before adding the Property Sets. This worked just fine for all but one recalcitrant door, for which the zoom to feature simply would not work. I thawed and turned on all layers, thinking that perhaps if the door were on a frozen layer, that might disable the zoom to feature. That did not help.

Then it occurred to me that I might be able to get some information on the Door by editing the cell contents of one of the manual properties associated with that door. This forced the associated Property Set to be added to that door, and allowed me to determine the Style of the Door on that line. I also "marked" that Door by adding a value to the manual Remarks property that I knew would be unique in that drawing file. After selecting OK to register this change, I still was unable to use the zoom to feature.

Armed with the Style name of the Door, I used the Quick Select dialog (QSELECT command, also available as a button at the top of the Properties palette) to select all Doors of that style. Without clearing the grips on the selected items, I panned around the file, looking for a selected door that was untagged that might be the culprit. Eventually, I found a set of Door grips that had no associated Door graphics, and assumed that this was the Door to which I could not zoom. I deselected all of the other doors and checked the layer and display settings for that door, but did not find anything amiss (no frozen layer and no style- or object-level display override with all components turned off for active Display Representations). I tried moving the Door, and it would only move to another Wall (but stayed invisible), so I assumed it was anchored to an "invisible" Wall. I checked the Anchor data on the door (found under the Location category on the Design tab of the Properties palette, which indicated that the Door threshold was set to the bottom of the Wall, the center of the Door was centered on the width of the Wall and the start edge of the door was within a few feet of the start of the Wall. I did note that the anchor grip fell right in the middle of another, visible wall, which explained why "*Space Not Found*" was showing up in the door number property (we use the room number as part of the door identifier).

Finally, I WBLOCKed that Door out to a separate file, which also brings the Wall along to the WBLOCK file. I opened that file and selected all objects. In the Properties palette, I used the drop-down list at the top to look at just the Wall properties, and the reason why both Door and Wall were invisible became immediately obvious – the elevation of the Door was set to 9’-9 3/4", and the cut plane for the current Display Configuration was set at 3’-6". Back in the original file, I temporarily raised the Cut Plane to 12’-6" and the phantom Door and Wall became visible. I determined that neither belonged in the file and I erased them, removing the problem line from my Schedule Table.

If I come across this again in the future, I hope to remember the lesson I learned today, and will turn on at least one of the Above Cut Plane components and Below Cut Plane components for Doors at the drawing default level. Provided that any rogue Doors do not have style- or object-level overrides set, that would add visible graphics to any doors entirely above or below the cut plane to the file. Once there are visible graphics, the zoom to feature will work and allow each Door to be easily found. If there are style-level overrides involved, I could remove those after finding the name of the Style as noted above (you do have to have an automatic property that displays the Style name, but one could be temporarily added to an object-based Property Set that is used in the Schedule Table). If an object-level override was used (yet another reason to avoid these whenever possible), then the select all Doors of that style and manually pan around the drawing looking for grips without graphics approach would be necessary.

My original problem was created and diagnosed in Autodesk® Architectural Desktop 2004, but I have confirmed that the same behavior applies to AutoCAD® Architecture 2008 as well.

October 21, 2008

Generating the Layers in a Layer Key Style

2/13/2019 - Updated to support ACA 2019.
11/2/2017 - Updated to support ACA 2018.
1/26/2017 - Updated to support ACA 2013 through 2017.
4/3/2011 - Updated to support ACA 2012.
1/27/2010 - Updated to support ACA 2010 & 2011.

Making use of the AecGenerateLayerKey function noted in this previous article, along with the code shown there for loading the appropriate ARX file (updated to work for versions from ADT 3.3 through ACD-A 2009), the AutoLISP code shown below will generate all of the layers associated with the Layer Keys in the current Layer Key Style.
(defun C:LKL (                           ; No arguments.
              / ;_ Local variables:
               flag                      ; Set to T if ARX loaded, nil otherwise.
               sacdvr                    ; String stored in ACADVER system variable.
             ) ;_ End arguments and local variables.
  (setq sacdvr (getvar "ACADVER")) ; Get AutoCAD version.
  ;; ARXload proper ARX function:
  (cond     ; cond A.
    ((= "15.06" sacdvr)
     ;; ARXload ADT3.3 function:
     (if (not (member "aeclayermanagerui30.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn                            ; ...do the following:
         (prompt "\nARXloading \"aeclayermanagerui30.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclayermanagerui30.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)                        ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)   ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A1.
    ((= "16.0" sacdvr)
     ;; ARXload ADT2004 function:
     (if (not (member "aeclmgrlisp40.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn    ; ...do the following:
         (prompt "\nARXloading \"aeclmgrlisp40.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclmgrlisp40.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)  ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)   ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A2.
    ((= 16.1 (atof sacdvr))
     ;; ARXload ADT2005 function:
     (if (not (member "aeclmgrlisp45.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn    ; ...do the following:
         (prompt "\nARXloading \"aeclmgrlisp45.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclmgrlisp45.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)  ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)   ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A3.
    ((= 16.2 (atof sacdvr))
     ;; ARXload ADT2006 function:
     (if (not (member "aeclmgrlisp47.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn    ; ...do the following:
         (prompt "\nARXloading \"aeclmgrlisp47.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclmgrlisp47.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)  ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)   ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A4.
    ((= 17.0 (atof sacdvr))
     ;; ARXload ADT2007 function:
     (if (not (member "aeclmgrlisp50.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn    ; ...do the following:
         (prompt "\nARXloading \"aeclmgrlisp50.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclmgrlisp50.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)  ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)                     ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A5.
    ((or (= 17.1 (atof sacdvr))
         (= 17.2 (atof sacdvr))
         (= 18.0 (atof sacdvr))
         (= 18.1 (atof sacdvr))
         (= 18.2 (atof sacdvr))
         (= 19.0 (atof sacdvr))
         (= 19.1 (atof sacdvr))
         (= 20.0 (atof sacdvr))
         (= 20.1 (atof sacdvr))
         (= 21.0 (atof sacdvr))
         (= 22.0 (atof sacdvr))
         (= 23.0 (atof sacdvr))
     ) ;_ End or.
     ;; ARXload ACA 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 or 2019 function:
     (if (not (member "aeclmgrlisp.arx" (arx)))
                                         ; If the ARX file is not currently loaded...
       (progn    ; ...do the following:
         (prompt "\nARXloading \"aeclmgrlisp.arx\". ")
                                         ; Display prompt noting file to be loaded.
         (if (arxload "aeclmgrlisp.arx" nil)
                                         ; If ARX file loads successfully...
           (setq flag T)  ; ...set flag to T.
           (prompt "\n; error: ARXLOAD failed")
                                         ; ...else display prompt and return nil.
         ) ;_ End if.
       ) ;_ End progn.
       (setq flag T)   ; ...else already loaded, set flag to T.
     ) ;_ End if.
    ) ;_ End condition A6.
    (T
     (alert
       (strcat
         "Unsupported version of AutoCAD is running."
         "\nACADVER = "
         sacdvr
         "."
       ) ;_ End strcat.
     ) ;_ End alert.
     nil    ; Return nil.
    ) ;_ End condition A7.
  ) ;_ End cond A.
  (if flag
    (progn
      (mapcar 'AecGenerateLayerKey (AecLayerKeyList))
      (alert
        (strcat
          "\nLayers generated from current Layer Key Style. "
          "\nAny previously defined layers not overwritten! "
        ) ;_ End strcat.
      ) ;_ End prompt.
    ) ;_ End progn.
  ) ;_ End if.
  (prin1)
) ;_ End C:LKL.

Keep in mind that if the drawing file in which the LKL command function is run already has one or more layers with the same name as those defined in the current Layer Key Style, those layers will be left "as is" and will not have the layer attributes that are assigned in the Layer Key Style imposed upon them. If Layer Key Overrides are enabled, any Layer Key Overrides that are set will be applied to the generated layer names.

You can find a ZIP file with the "old" AutoLISP code (supports 3.3 through 2009 only) in this thread in the Autodesk AutoCAD® Architecture Discussion Group. 4/3/2011 - A ZIP file with version 1.2 that supports 3.3 through 2012 has been posted to that thread.

1/26/2017: An updated version that supports 3.3 through 2017 has been posted to this thread in the AutoCAD® Architecture Forum.
11/2/2017: An updated version that supports 2018 has been posted to that same thread, in my post dated 11/2/2017 at 6:54 pm United States Eastern Time Zone Daylight Savings Time (your local date and time may vary).
2/13/2019: An updated version that supports 2019 has been posted to that same thread, in my post dated 2/13/2019 at 9:14 pm United States Eastern Time Zone Standard Time (your local date and time may vary).

October 20, 2008

Update 2 Available from Website for AutoCAD® Architecture 2009

Update 2 and the accompanying Readme can now be downloaded from the Autodesk website, in addition to being able to access it through the Communication Center, as previously noted.

October 09, 2008

Update 2 Available for AutoCAD® Architecture 2009

While links (for 32-bit and 64-bit versions) have not yet been posted here, if you check the Communication Center in ACD-A 2009, you should find Product Update 2 is now available. The Communication Center link will take you to a "live update" site. Be certain to read the README first, or a least the section on installation. No worries if you never installed Update 1, as Update 2 includes all of the Update 1 fixes as well, so you only need to install Update 2.

I got an error message at the end of the installation, claiming it was incomplete, but when I reopened 2009, it showed as Version 3, which is Update 2. An attempt to install the Update again failed, saying the product was up to date. The first fix noted in the README was the improper scaling of non-annotative Multi-View Blocks from user-created tool palette tools, an issue I first noticed in 2008, and which persisted in 2009. A quick test resulted in correct behavior, so I am assuming that the Update installed correctly for now. Three cheers to the ACD-A team for fixing one of my pet peeves with this Update.

October 08, 2008

atomicBIM

John Tobin of Einhorn Yaffee Prescott Architecture & Engineering PC has written a very interesting article on the future of Building Information Modeling. Not to worry, there is no radioactivity involved in "atomicBIM", but the concept he discusses should be of interest to anyone currently or about to become involved with Building Information Modeling.

September 24, 2008

Autodesk Discussion Group Login/Redirect URLs

I am still trying to get used to the new web interface in the Autodesk Discussion Groups and also updating my shortcuts and favorites to adjust the URLs for the new consolidated login. I found myself being shunted to the main Autodesk website when going directly to the consolidated login page, rather than to the Discussion Groups. My browser home page was set to the old Discussion Group login page, and my first attempt to update it allowed me to login, but then I had to navigate to where I wanted to go. To add insult to injury, the Services & Support > Discussion Groups link from the main Autodesk webpage was (and as of right now, still is) broken.

A little bit of looking at the Javascript commands behind the Login links on the Discussion Group pages and a bit of experimentation has resulted in the following URLs:

To login and be redirected to the main Discussion Group Index page:
https://discussion.autodesk.com/ConsolidatedLogin/html/login.action?handoffURL=/forums/index.jspa?categoryID=1

To login and be redirected to the AutoCAD® Architecture Index page:
https://discussion.autodesk.com/ConsolidatedLogin/html/login.action?handoffURL=/forums/category.jspa?categoryID=10

I will be changing the Autodesk Discussion Group Login link in the right column to redirect to the main index page (which is what would have happened previously, after logging in), but will use the second one for my home page, desktop shortcut and favorites, since I spend most of my time in the AutoCAD Architecture Discussion Groups.

September 23, 2008

Equal Lights in the AU Newsletter

October 26, 2009 Update: The links to the article on the AU Online site no longer work and have been removed. The article has been republished in this blog article. The link below to the drawing file used for the images in the article remains valid.

The September 2008 edition of the AU Quarterly Newsletter is out. This issue adds links to technical articles, along with the usual AU news, including one on creating Door/Window Assemblies and Curtain Wall Units with equal light openings.


You can find the file with the Door/Window Assemblies that generated the images for the article in this thread in the AutoCAD® Architecture Content Discussion Group.

September 16, 2008

Z-Coordinates of Aec Objects

A recent thread in the Autodesk AutoCAD® Architecture Discussion Group reminded me that I had never followed up on another thread, in which a solution to the inability to extract coordinate values from the Location property of an Aec Object. In particular, the Z-coordinate was of interest, because there is no automatic property for the elevation.

The VarType and TypeName functions indicate that the Location property contains an array of doubles, but the individual values could not be extracted directly. Thanks to the code that BHashman posted, the coordinate values can be extracted by making use of the ConvertToVariantArray method of the Utility object of the AecBaseDocument object. (The ConvertToVariantArray is not listed in the Help.) Here is a variation on that code, to extract the elevation of a Wall, with an added test for the current version running, so that the same Formula property can work in both 2008 and 2009.
Set acadApp = GetObject(,"AutoCAD.Application")
'ACADVER values:
'ACD-A2008 = "17.1s (LMS Tech)"
'ACD-A2009 = "17.2s (LMS Tech)"
acadVerString = acadApp.ActiveDocument.GetVariable("ACADVER")

'Set ADT application string, based on version running:
Select Case acadVerString
Case "17.1s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.5.5"
Case "17.2s (LMS Tech)"
aecBaseVer = "AecX.AecBaseApplication.5.7"
Case Else
aecBaseVer = "Unknown"
End Select

If aecBaseVer = "Unknown" Then
RESULT = "Unknown Version"
Else
Set aecBase = acadApp.GetInterfaceObject(aecBaseVer)
aecBase.Init acadApp
Set wallObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
Set utilObj = aecBase.ActiveDocument.Utility
wallLocation = utilObj.ConvertToVariantArray(wallObj.Location)
RESULT = wallLocation(2)
End If
The code needed for this to work in 2007 is not exposed, so this will only work in 2008 or 2009. Assuming that the code will continue to work in future releases, all that would be necessary would be to determine the value of the ACADVER sytem variable and the AecX.AecBaseApplication version number and then add an additional Case statement to support that release.

A sample file can be found in a reply to this thread. I left in a lot of the test formulas I used along the way - the WallElevation-Location property has the Formula shown above, and there are three walls at three different elevations which show that the Z-coordinate is being extracted. The WallElevation-StartPoint property does the same thing, but uses the StartPoint property, which is the same as the Location property for Walls. Most AEC "real-world" objects have a Location property, so that may be a better starting point when adapting this for other objects. Be certain to check the properties available on the AEC object of interest in the AutoCAD Architecture ActiveX Reference section of the Help to determine what property to use.

September 15, 2008

On Error Resume Next

Those four words (in the title above) can prove to be quite valuable if you use a Formula property to extract data from the object to which the property is attached. For example, suppose that you had a situation in a Door Schedule where you needed to know the "door type" of each door being scheduled. This is not available from an automatic property source, but can be retrieved in a Formula property, as previously shown here and here. The door type as a text string formula from the latter post, which works across external references for those using ADT 2006 or later, is reproduced here, for reference:
Set acadApp = GetObject(,"AutoCAD.Application")
Set doorObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
Set doorStyle = doorObj.Style
doorTypeInt = doorStyle.Type

Select Case doorTypeInt
Case "0"
RESULT = "Custom"
Case "1"
RESULT = "Single"
Case "2"
RESULT = "Double"
Case "3"
RESULT = "Single-Dhung"
Case "4"
RESULT = "Double-Dhung"
Case "5"
RESULT = "Double Opposing"
Case "6"
RESULT = "Uneven"
Case "7"
RESULT = "Uneven-Dhung"
Case "8"
RESULT = "Uneven Opposing"
Case "9"
RESULT = "Bifold"
Case "10"
RESULT = "Bifold Double"
Case "11"
RESULT = "Pocket"
Case "12"
RESULT = "Double Pocket"
Case "13"
RESULT = "Sliding Double"
Case "14"
RESULT = "Sliding Triple"
Case "15"
RESULT = "Overhead"
Case "16"
RESULT = "Revolving"
Case "17"
RESULT = "Pass Thru"
Case "18"
RESULT = "Accordion"
Case "19"
RESULT = "Panel"
Case "20"
RESULT = "Communicating"
Case Else
RESULT = "Unknown Door Type"
End Select


Suppose further that your "Door Schedule" is for a commercial project where the doors have hollow metal frames and that you have several borrowed lights that have no door, but which you want to include in the "Door Schedule" (making it more of an "Opening Schedule"). If you choose to use Door/Window Assemblies to model those borrowed lights, it is easy enough to make the Property Set Definition(s) and Schedule Table Style apply to both Doors and Door/Window Assemblies. Unfortunately, when you take a look at the value of that Formula property when it is attached to a Door/Window Assembly, you will find that the formula fails. The reason for this is that Door/Window Assemblies Styles do not have a "type" property, so the
doorTypeInt = doorStyle.Type
line in the formula fails.

This is where those four words come in handy. By placing them at the beginning of the formula, you are telling ACD-A/ADT that if an error condition occurs, to continue evaluating the formula starting with the line after the line where the error occurred. The doorTypeInt variable will not be set to a value, but that is acceptable, since we can use the Case Else statement to set a RESULT value when the style of the object to which the property is attached does not have a "type" property.
On Error Resume Next
Set acadApp = GetObject(,"AutoCAD.Application")
Set doorObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
Set doorStyle = doorObj.Style
doorTypeInt = doorStyle.Type

Select Case doorTypeInt
Case "0"
RESULT = "Custom"
Case "1"
RESULT = "Single"
Case "2"
RESULT = "Double"
Case "3"
RESULT = "Single-Dhung"
Case "4"
RESULT = "Double-Dhung"
Case "5"
RESULT = "Double Opposing"
Case "6"
RESULT = "Uneven"
Case "7"
RESULT = "Uneven-Dhung"
Case "8"
RESULT = "Uneven Opposing"
Case "9"
RESULT = "Bifold"
Case "10"
RESULT = "Bifold Double"
Case "11"
RESULT = "Pocket"
Case "12"
RESULT = "Double Pocket"
Case "13"
RESULT = "Sliding Double"
Case "14"
RESULT = "Sliding Triple"
Case "15"
RESULT = "Overhead"
Case "16"
RESULT = "Revolving"
Case "17"
RESULT = "Pass Thru"
Case "18"
RESULT = "Accordion"
Case "19"
RESULT = "Panel"
Case "20"
RESULT = "Communicating"
Case Else
RESULT = "Unknown Door Type"
End Select


If you had wanted the Formula property to return the raw value of the "type" property, you can still make use of "On Error Resume Next". The most efficient way is to set the RESULT to the default value up front, and then reset it only if the object is of a type for which the property value you are extracting exists. Using the door type as a number example from that previous article, Door/Window Assemblies could be accommodated by modifying the formula to the following:
On Error Resume Next

RESULT = -1

Set acadApp = GetObject(,"AutoCAD.Application")
Set doorObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
Set doorStyle = doorObj.Style
doorTypeInt = doorStyle.Type
If "[ObjectType]" = "Door" Then
RESULT = doorTypeInt
End If


You need to test for the ObjectType (which can be obtained through an automatic property source) at the end, since you only want to reset the RESULT value if the object is a Door. I chose -1 as the value to report for Door/Window Assembly objects since the Door type numbers start at 0 and increase from there; should a future release add one or more new door types, it is likely that those types would be assigned numbers starting with 21 and increasing, making -1 a relatively safe choice to indicate that the object is not a Door while still maintaining the same data type.

September 05, 2008

AU Online Newsletter

Even if, like me, you will not be attending AU this year, you can still bennefit from the event and its year-round, 24/7 component, AU Online. You may be aware of AU Online from a previous blog post or because you have attended a recent AU and joined as part of the registration procedure. Becoming a registered member at the site gives you access to the class handouts from 2006 and 2007. If you are on Subscription for your Autodesk product, and you register for AU Online through the Subscription site, you should also have access to the most recent year's screencasts (a recording of what was shown on the screen at the session, plus audio of the presentation) of sessions that were recorded. Attendees of the last AU should also have access to that year's screencasts.

If you are not yet a member, or if you are, but chose not to receive the quarterly newsletter, I would urge you to join now or edit your profile and, on the Basic Profile tab, check the toggle to subscribe to the quarterly newsletter. Previous newsletters have been mostly focused on announcing times, dates and tips for the next AU, but I am told that starting with this month's newsletter, there will also be technical content included. So sign up and then look forward to the next newsletter.

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.