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.