December 29, 2017

ACA: Curved Mass Elements - Part 2: Shape Impact

First article in the series: ACA: Curved Mass Elements - Part 1: FacetDev and FacetMax

The Shape property of a curved Mass Element will affect how it reacts to the FacetDev and FacetMax settings. Any of the standard shapes that involve a curve, Arch, Barrel Vault, Cone, Cylinder, Dome, Doric and Sphere, will be initially placed based on the settings of FacetDev and FacetMax, and will update when changes to the FacetDev value would result in a different number of segments. A change to the value of FacetMax will not result in a change to the faceting of existing Mass Elements, even if it would cause a lesser or greater number of segments. The effect of a change to FacetMax on existing objects will be seen only if the value of FacetDev is subsequently changed by an amount sufficient to result in a different number of facets.

Mass Element Extrusions and Revolutions that have curves in the defining Profile will also retain the ability to change the number of facets when FacetDev is changed. Freeform Mass Elements, however, will have the number of facets present at the time of creation, regardless of later changes to the value of FacetDev. How can you end up with a Freeform Mass Element? The following will produce one:
  • Use of the Boolean tools to create Unions, Subtractions or Intersections of two or more Mass Elements that results in a shape that cannot be created by extruding a Profile placed in the X-Y plane in which the first object was created.
  • Use of the AecMassElementConvert command to convert an AEC object or an AutoCAD 3D Solid to a Mass Element. The Convert to Mass Element tool on the out-of-the-box Massing palette (in the Design tool palette group, in the US Imperial content, and, likely other content as well) runs this command. You can also access this command by selecting an AutoCAD 3D Solid, right clicking and chosing Convert to > Mass Element from the context menu.
  • Use of the ConvertMEToFFME command to convert an AutoCAD 3D Solid or a standard-shape Mass Element to a Freeform Mass Element. For standard-shape Mass Elements, this command can be invoked by selecting the Mass Element, right clicking and choosing Convert to > Freeform Mass Element on the context menu. NOTE: If you right click on one of the standard-shape tools on the Massing tool palette, and choose Apply Tool Properties to > Mass Element, the ConvertMEToFFME command will be run, but the 3D Solid or Mass Element will be converted into a Mass Element with the standard shape of the tool which was right-clicked.
In the images below, all three things started from the same source. At the lower left, there are the original objects: a Cylinder base and a Cone on top. In the middle, with FacetDev set to 20, with the Cylinder selected, Boolean > Union was selected from the right-click context menu, and then the Cone was chosen. The same operation was performed on the source objects in the upper right, but with FacetDev set to 0.5. In the top image, FaceDev is set to 0.5, and you can see that the facets on the Freeform Mass Element in the upper right match those of the Cylinder and Cone in the lower left, while the Freeform Mass Element in the middle retains the faceting that was current when it was created. For comparison, FacetDev is set to 20 in the lower image, and you can see that the faceting of the middle Freeform Mass Element matches that of the Cylinder and Cone in the lower left, while the faceting of the Freeform Mass Element in the upper right remains as it was at the time it was created.

December 27, 2017

Dynamo: Forcing Exactly One-Half to Round Up

In the same Dynamo graph on which my previous post was based, I had a need to round a real number to the nearest whole number, and I wanted a decimal of exactly .5 to round up. The Math.Round node met all my rounding needs except for when the decimal value is exactly 0.5; that node "rounds to even," which means that both 1.5 and 2.5 will round to 2, since 2 is even. Statistically, when dealing with a large amount of data, always rounding exactly 0.5 to even (or rounding always to odd) makes sense, as always rounding up would tend to skew any mathematical analysis of the data to a higher value. In this case, the number was being used only as a label, and I decided that it should always round up.

I put together the following nodes to achieve the desired results. Numbers in the explanation below refer to the numbers in the image. As always, you can click on the image to see the full-size version.

  1. This code block provides the source number to be processed.
  2. The nodes in Area 2 divide the source number by 100. In the example in the image, this results in a value of 12.5. This value is fed to the nodes in Areas 3, 4 and 5.
  3. The Math.Floor node truncates any fractional part in the value from Area 2, resulting in an integer of 12 in the example. This value is fed to the nodes in Areas 5 and 6.
  4. The Math.Round node takes the value from Area 2 and rounds it. For the example value of 12.5, the .5 is rounded to even, or 12. The result is a floating point number. This value is fed to a node in Area 7.
  5. The nodes in Area 5 take the value from Area 2 (12.5 in the example) and Area 3 (12 in the example) and subtract the Area 3 value from the Area 2 value. The result of the subtraction (0.5 in the example) is compared to the value in the Code Block, which is 0.5, by the == node. If the two are equal, the result of the comparison is true, as it is in the example; otherwise, it is false. This result is fed to the test input of the If node in Area 8.
  6. The Area 6 nodes take the integer result from Area 3 and add the value in the Code Block, or 1.0, to it. This is the rounded up value; it is 13 in the example.
  7. The two Math.Floor nodes in Area 7 take the real number results from Areas 4 and 7 and convert them to integers. These values were already whole numbers, but the Math.Round and + nodes output is a floating point number, not an integer. The application for which this rounding is being done required an integer. If it does not matter to your application whether the rounded number is a floating point number or an integer, these nodes would not be required. In hindsight, it occurs to me that one Math.Floor node could have been placed after the If node.
  8. The If node in Area 8 determines whether to use the result of the nodes in Areas 4 - 7 or Areas 3 - 6 - 7, based on whether Area 5 evalutes to true or false. If true, then the fractional part was exactly 0.5, and the rounded up value from Areas 3 - 6 - 7 is used. Otherwise, the rounded value from Areas 4 - 7 is used. This value will be rounded up for fractional values greater than 0.5 and down for fractional values less than 0.5.

December 25, 2017

Dynamo: Selecting All Curtain Walls

An opportunity to use Dynamo to create a string with which to tag Curtain Walls came up in a thread in the AUGI Revit Architecture - Families Forum. The first task for the Dynamo graph is to select all of the Curtain Walls in the Autodesk® Revit® project file. The All Elements of Category node, in combination with the Categories node, is the usual method for selecting all objects of a particular category in a project file, but there is no Curtain Walls category; you have to choose Walls as the category, and you get all of the Walls, including Basic Walls, Curtain Walls and Stacked Walls.

Thanks to the Filtering / Selecting Curtain walls thread in the Dynamo Forum, in particular, the third post by thread initiator Aseem Deshpande, I was able to use a modified version of what was shown in that post to generate a list of just Curtain Walls from the list of all Walls. (The code posted by Aseem Deshpande sought to remove the Curtain Walls, leaving only "opaque" Walls.) I too had used the Element.Parameter node to examine the available parameters and noted that the Family parameter held the information I needed to determine if a Wall was a Curtain Wall. Unfortunately, I also found that the Element.GetParameterValueByName node was returning the Type name, rather than the value of the Family parameter. The nodes in the post provide a way to make use of the Family parameter value to determine if a particular Wall is a Curtain Wall.

In the image below, the list of all Walls generated by the nodes in the image above, is fed to both the Element.Parameters node and the List.FilterByBoolMask node.
The Element.Parameters node takes the list of all Walls and creates a list of lists; each sub-list contains a list of the parameters attached to each Wall. The Parameter.Name node takes the list of lists of parameters and converts each parameter object to a string of the parameter name. That list of lists of parameter names is then fed to the List.FirstIndexOf node, which outputs a list of the index of the first occurrence of the string "Family" in each sub-list.

The List.GetItemAtIndex node takes the list of parameters lists and the list of indexes of the Family parameter to create a list of the Family parameters. The String from Object node converts each item on that list from a parameter and its value to a string. A code block then tests each string to see if it is equal to "Family : Curtain Wall", which is the value that will be present for Curtain Walls; the output is a list of True or False values, True representing Curtain Walls and False representing Basic or Stacked Walls. This list of Booleans is used as the mask input to the List.FilterByBoolMask node, and is applied to the list of all Walls. That node generates two lists, the "in" list contains all the "Trues", or Curtain Walls, and the "out" list contains all the "Falses". The "in" list is what I needed for the balance of that graph, a list of all of the Curtain Walls in the Revit project.

December 19, 2017

Downloading Autodesk Software

My go-to for downloading Autodesk software from the Autodesk site, the Autodesk Virtual Agent, has been retired, and if you go to that URL, you will, for the next forty-two days or so, find something that looks like this (with a reduced countdown time):

The good news is that the same functionality is still available, through AVA, the "new" Autodesk Virtual Agent. AVA is not really new; she has been around for some time now, answering general questions. What is new is now AVA can provide the download links that the old Virtual Agent provided. If you click on the "Launch AVA Now" link, you will be taken to AVA, pre-set for downloading. If you manage a number of users and find yourself frequently downloading installation files from the Autodesk site, bookmark that link. Or, you can go to the main link to AVA, and type in download as your first response to get Download A Product to show on the right side.

November 30, 2017

ACA: Column Bubble "Leader" Object Types

I ran into some display issues with the anchors that connect Column Bubbles to a Column Grid, and discovered that there are two different object types that can be involved, depending upon how the labels were generated. It took me a while to sort all of that out, so I thought I would document it here for my own future reference as well as to share it with others.

If you create the labels by selecting a Column Grid and use the ColumnGridLabel command, or a Custom Column Grid and use the CustomColumnGridLabelAdd command, the anchor objects will be Anchor Bubble to Column Grid objects. If you use the Column Bubble tool (such as the one on the out-of-the-box Annotation tool palette), the anchor objects will be Anchor Lead Entity to Node objects.

If you use a mix of these, any display changes will have to be applied to both object types to have them display the same way.

November 26, 2017

ACA: Curved Mass Elements - Part 1: FacetDev and FacetMax

A thread in the AutoCAD® Architecture Forum last month brought to my attention that I have not yet addressed how AutoCAD Architecture handles "curved" Mass Elements. "Curved" is in quotation marks because AutoCAD Architecture does not display Mass Elements with true curves, but instead will approximate curves with a series of straight-line segments (2D) or facets (3D).
In the image above, a Mass Element Cylinder with a radius of 10'-0" and a height of 5'-0" has been placed, with FacetDev set to 10'-0" to make the facets obvious.

Two settings control the number of segments that are generated, FacetDev and FacetMax:
  • FacetDev is the allowable deviation of a facet from the true curve, and represents the maximum distance allowed from the midpoint of a facet, perpendicular to the true curve. Larger values will generate fewer facets. Smaller values will generate more facets. A full circle will never have less than eight segments, as seen in the image above. FacetDev must be a positive (non-zero, non-negative) value. Note: If imperial architectural units are set current, the command line will show the current value as a linear distance in those units (feet and inches), the value you enter needs to be a real number, without any feet or inchese symbols. For example, to set a value of 1'-0", type 12 and press the ENTER key.
  • FacetMax sets a maximum number of facets for a single curve. For designs that feature curves with a wide range of radii, FacetMax allows setting FacetDev to a sufficiently small number to achieve a reasonable smoothness on the smaller radii without imposing a serious performance hit due to the large number of segments on the larger radii, which would look smooth with larger FacetDev value. Valid values for FacetMax are integers between 100 and 10000, inclusive.
In the image below, I changed the Visual Style from Conceptual (used in previous image) and I set DISPSILH to 0, so that the lines between facets on the curved surface will show (rather than just displaying the silhouette), viewing the same Mass Element Cylinder as in the previous image. On the left side, FACETDEV remains set to 120 (or 10'-0"). On the right, FACETDEV has been set to 0.5 (or 1/2"). The first value is high enough to result in the minimum 8 facets. The second number results in a much higher number of facets, and is closer to a smooth curve.

With DISPSILH reset back to 1, the image below shows the same cylinder in the 2D Wireframe (left) and Conceptual (right) Visual Styles.

Next article in the series: ACA: Curved Mass Elements - Part 2: Shape Impact

October 31, 2017

ACA: Start Tab and New Drawing Files

This most likely applies to "plain" AutoCAD® and all verticals built on AutoCAD. The Start tab has been there for quite a few releases so far, but somehow I only figured the following out recently, so I thought I would document it here for anyone else who is unaware of it. I almost always start AutoCAD® Architecture from a desktop shortcut, and then start and leave open a blank, new drawing ("Drawing1"). This is an old habit - many releases back, settings would get lost if you closed the program in a "zero-doc" state (no open drawings), so I got in the habit of leaving the initial drawing that opened when starting the program from a shortcut (before the New/Start tab was added), as I like to save and close my working files manually, rather than relying on the program to prompt me to save any unsaved files if I were to close the program with working files open. (I have a lot of little habits like that - otherwise, I am perfectly normal.)

Anyway, now that the Start tab is there on startup, I usually create a new file from my default template, and had been using the Templates drop-down list to choose a template.
Here at home, the list of templates is pretty long, but the last template used has the initial highlight, making it semi-easy for me to select it again most of the time. At work, the list is much shorter, making it even easier to get the right one. I had been doing that for years, until I discovered that the Start Drawing rectangular area just above the Templates drop-down list is not just pretty graphics - it is a giant button, and will start a new drawing with the template assigned as the QNEW template in the Options dialog for the current AutoCAD Profile. That is the template I use for Drawing1 99.99% of the time anyway, so now I can save at least three to four seconds and a click every time I start the program by clicking on that button instead of using the drop-down list.


PS. Yes, I see the notification that I have three product updates. I checked, and they are for various versions of Revit®. I promise to download and install them soon.

October 21, 2017

ACA: Using AutoLISP to Change the Heights of All Doors of a Given Style

There was a request in the AutoCAD® Architecture Forum for a script or customization that could change the heights of all Doors of a specific style to 5'-2". I decided that would be an interesting challenge, and decided to see if I could come up with an AutoLISP® function that would to just that. The exact style name was not given, and I may not have had a style of that name, anyway, so I decided to set up my test file with several instances of the out-of-the-box Bifold - Single Door Style, along with some other Doors.

The routine first gets all of the Doors in the drawing file. If none are found, an alert message is displayed, and the function terminates. If Doors are found, the function iterates over that selection set of all Doors, one Door at a time, looking for Doors of the Bifold - Single Door Style. When one is found, its Height property is changed to 62.0. When all of the Doors have been examined, the program reports that it is complete and lets the user know how many Doors had their height set to 62.0, of the total number of Doors. The routine does not check to see if the height is already 62.0, so it will report the total number of Bifold - Single Doors as being processed. If it were important to report on the number of Doors that actually were changed, the current height could be obtained and compared against the desired height, and any Doors that were already set to the desired height could be skipped.
(defun C:DRHT (                         ; No arguments.
               /
                iCount                  ; Loop counter [integer].
                iMax                    ; Total number of Doors in file [integer].
                iProc                   ; Number of Doors processed [integer].
                objDoor                 ; Door object being processed.
                ss1                     ; All Doors in the file [selection set].
                sStyleName              ; Style name of Door being processed [string].
              ) ;_ End arguments and local variables.
  (setq        ss1 (ssget "_X" '((0 . "AEC_DOOR"))))
  (cond
    ((not ss1)                          ; No Doors in drawing.
     (alert "Drawing file has no Door objects.\nNothing to do!")
    ) ;_ End condition A1.
    (T                                  ; Else, continue.
     (setq iMax          (sslength ss1)
           iCount 0
           iProc  0
     ) ;_ End setq.
     (while (< iCount iMax)
       (setq objDoor    (vlax-ename->vla-object (ssname ss1 iCount))
             sStyleName (vlax-get-property objDoor 'StyleName)
       ) ;_ End setq.
       (if (= sStyleName "Bifold - Single")
         (progn
           (vlax-put-property objDoor 'Height 62.0)
           (setq iProc (1+ iProc))
         ) ;_ End progn.
       ) ;_ End if.
       (setq icount (1+ icount))
     ) ;_ End while.
    ) ;_ End condition A2.
  ) ;_ End cond A.
  (prompt
    (strcat
      "\nDRHT function completed:  "
      (itoa iProc)
      " Door(s) of "
      (itoa iCount)
      " total Door(s) processed. "
    ) ;_ End strcat.
  ) ;_ End prompt.
  (prin1)
) ;_ End C:DRHT.

Change the (if (= sStyleName "Bifold - Single") line, replacing "Bifold - Single" with the name of the Door Style you want to operate on (enclosed in double quotes). Change the (vlax-put-property objDoor 'Height 62.0) line, replacing 62.0 with a real number representing the desired Door Height in whatever your current linear drawing unit is (inches, millimeters, etc.). The code could also be modified to remove the Style Name test, if you wanted to reset the heights of all Doors in a project to a specific height.

September 24, 2017

Autodesk Answer Days

The next Autodesk® Answer Day will be on October 5, 2017, from 6:00 am to 6:00 pm U.S. Pacific Time. Autodesk team members will be scouring the AutoCAD, AutoCAD Civil 3D, Revit, Inventor, Vault, Maya and 3ds Max forums.

This event will also take place in the following German-language forums, on October 5, 2017, from 10:00am to 5:00pm Central Europe Time: 3ds Max - Deutsch, AutoCAD Produktfamilie - Deutsch, EAGLE - Deutsch, Fusion 360 - Deutsch, Inventor - Deutsch, Maya - Deutsch, Revit - Deutsch.

Read more about the event here and mark your calendar.

August 11, 2017

Multiple Plug-ins Ribbon Tabs...

...instead of one Add-ins ribbon tab, in AutoCAD® Architecture 2018. I found this Autodesk Knowledge Network article on the topic, indicating it was for AutoCAD® Map 3D, 2014/2015, but also applying to AutoCAD® and other verticals, for the 2014, 2015, 2016 and 2017 releases. The instructions worked just fine in AutoCAD Architecture 2018.

As noted, I did not need to do Steps 2, 3 and 4, but I did check to see that was all in place prior to proceeding with the balance of the steps. After unloading the partial customization files for the two plug-ins that I had installed and then closing and restarting the program, the individual panels for the plug-ins showed up on a single Add-ins tab. I did have to turn on the display of the Add-ins ribbon tab, but that was easily done by right-clicking on a blank area of the ribbon and choosing Show Tabs > Add-ins from the context menu.

Oddly, it all came in on one Add-ins tab for AutoCAD® MEP 2018, on the same machine.

August 03, 2017

AutoCAD Architecture 2018.0.2 Update Released

The 2018.0.2 Update for AutoCAD® Architecture 2018 was released on Tuesday, August 1, 2017. You can read the full release notes here. This update addresses issues with viewport layers not remaining frozen for Multi-View Blocks, AEC Objects in external reference files with display overrides still plotting and fatal errors caused by an increase in graphic objects during AEC object insertion.

The update is available through your Autodesk Account page or in the Autodesk desktop application.

July 30, 2017

Ribbon Tools in AutoCAD 2018.1 Update

The ".1" update for AutoCAD® 2018 for subscription and maintenance customers was released on July 27, 2017. You can see what's new in AutoCAD 2018.1 by reading the AutoCAD 2018.1 and AutoCAD LT 2018.1 Update Preview Guide. According to the Readme, the AutoCAD 2018.1 Update can be installed on AutoCAD-based verticals, such as AutoCAD® Architecture 2018 and AutoCAD® MEP 2018.

PLEASE NOTE: The update will overwrite the ACAD.cuix file for your 2018 product. If you have made any customizations to the ACAD.cuix file, be certain to back that file up prior to installing the update.
08/03/2017 UPDATE:  I have been told that the ACAD.cuix file does not get overwritten if you have already run the program at least once, but that the file is updated and the new panel and tool are added.  I would still back the file up prior to running the update if you have any customizations. The ACA.cuix or MEP.cuix file will not be updated.

While compatible with the vertical applications, the update will not update the customization files for those verticals that do not use the ACAD.cuix file as the main customization file, such as ACA.cuix and MEP.cuix. I personally have no problem with that, as I would rather maintain the Workspace customizations I have done in my main CUIX file* and manually transfer any new items I deem worthy. Here is how to get the Named Views panel and Insert View tool added in the AutoCAD 2018.1 update into your vertical's customization file. I will be working with the ACA.cuix file, but the same process applies to the MEP.cuix file, or that of any other AutoCAD-based vertical that does not use the ACAD.cuix file.

The first step is to install the AutoCAD 2018.1 update, which you can download from your Autodesk® Account page.

With the updated ACAD.cuix file for 2018 in place, you can now use the Transfer tab of the Customize User Interface dialog to copy the panel and the tool to your customization file. The following Screencast shows how to do so.
  1. After installing the AutoCAD 2018.1 Update, launch your vertical product.
  2. Start the CUI command to open the Customize User Interface dialog. Select the Transfer tab.
  3. The left pane of the transfer tab may already have your current main customization file open. If not, open it on this side.
  4. On the right pane, use the open tool and navigate to the location of the ACAD.cuix file in your user profile. Mine was located at
    C:\Users\dkoch\AppData\Roaming\Autodesk\ACA 2018\enu\Support
    Substitute your user name for "dkoch". Depending upon where you are in the world and what language version you have installed, the "enu" folder may have a different name. If you have your roaming Windows profile files on your network, then look there for the AutoCAD Vertical Product 2018 Support folder. Also keep in mind that the AppData folder is a hidden folder in Windows, so you will have to turn on the display of hidden files and folders if you plan to use the Search feature or navigate to the folder.
  5. On both the left and right panes, expand the Ribbon node and then the Panels node below that. Scroll down to find the Layout - Viewports panel in each customization file. Expand that panel's node and then expand the Row 1 node below that.
  6. On the right pane (ACAD.cuix), select both the Separator after Sub-Panel 1 and the Sub-Panel 2 node. The Sub-Panel 2 Node contains the Insert View tool.
  7. Hover the mouse over one of the highlighted items, press and hold the left mouse button down and drag those two items over to the left pane. Position the cursor just below the Sub-Panel 1 node. When you see the blue bar, release the left mouse button to drop those two items into the ACA.cuix version of the Layout - Viewports panel.
  8. If the Separator comes in below the Sub-Panel 2 node in the left pane, drag it up so that it is in between the Sub-Panel 1 and Sub-Panel 2 nodes.
  9. In the right pane (ACAD.cuix), scroll to find the View - Named Views panel.
  10. Drag the View - Named Views panel from the right pane to the left pane, under one of the nodes under the Panels node and drop it, to copy it to the ACA.cuix.
  11. Select the Customize tab in the Customize User Interface dialog.
  12. In the upper left pane, under the ACA node (or the node for the main customization file for your vertical product), expand the Ribbon node, and then expand the Tabs node under that.
  13. Scroll down to find the View - ACA ribbon tab, and expand that node. You will see a listing of the panels currently assigned to that tab.
  14. Scroll down and expand the Panels node under your main customization file. Scroll down to find the View - Named Views panel that you just copied.
  15. Drag the View - Named Views panel up toward the top of the list box in the upper left pane. The list box should start scrolling when you get close to the top. Keep scrolling until the View - ACA ribbon tab is visible.
  16. Drop the View - Named Views panel into the list of panels under the View - ACA node. I find that it is difficult to drop an item at the very end of a list of things under a node, so I usually drop it just above the current last item, and then drag that item above the item I just dropped, if I want the added item to be the last in the list.
  17. Select the OK button to ratify your changes and dismiss the Customize User Interface dialog.
  18. If a layout is not already set current, select a layout. The Layout contextual ribbon tab should appear. Select it and verify that the Separator and the Insert View tool were added to the Layout Viewports panel.
  19. Select the View ribbon tab and verify that the Named Views panel was added.

* - To make moving to a new release easier, I try to limit customization of the ACA.cuix file to those things that have to be there, such as Workspaces, and put as much as I can into a separate customization file, loaded as a partial customization file. That keeps my "stuff" mostly separate and I can adopt the ACA.cuix file that ships with the new release.

July 23, 2017

In What Version of AutoCAD Was My File Saved - Update 1

After using the FMT command over the last month or so (see this previous post), I became annoyed by the fact that, when trying to check multiple files in the same folder, I had to navigate to that folder from "My Documents" each time. The AutoLISP getfiled function can be told to start in a specific folder; my original code was written quickly and was initially more of a proof-of-concept effort. Actual use exposed the problem with using the default starting folder. So I made a few modifications to the code, including establishing a global variable (one that does not lose its value after a run of the program), sFmtPath, to hold the directory path of the file selected on the previous use of FMT.

I added an if statement at the very beginning of the code to test to see if the value of sFmtPath is either nil or is not a string. If either of those conditions is true, the value is reset to an empty string [""]. If neither is true, the string value is left as is. This string value is then passed as the second argument to the getfiled function. If you check the old code, you will see that this was hard-coded as an empty string, so on first use in a drawing editing session (or if the value was somehow changed to a non-string value), the program will run just the way the old one did, starting in the My Documents folder. But after that first run, supplying the folder path there and setting the flags argument (last argument) to 16 (setting the 4 bit) has the getfiled function use that folder as the initial starting folder, making it easier to check multiple files in the same folder, or a folder that is close by in the folder structure.

I suppose the initial test should, if sFmtPath does contain a string, also then check to see if that string represents a folder on the current machine, but, for now, I decided that would be overkill. Unless you intentionally mess with the value of sFmtPath or if you have another program that also sets a value of a global variable that is also named sFmtPath, there should not be any issues.

Here is the revised AutoLISP code.
(defun C:FMT ( / file1 sfile1 sline1 stext1)
  (if (or
        (not sFmtPath)
        (/= 'STR (type sFmtPath))
      ) ;_ End or.
    (setq sFmtPath "")
  ) ;_ End if.
  (setq sfile1 (getfiled "Select Drawing File" sFmtPath "dwg" 16)
        file1  (open sfile1 "r")
  ) ;_ End setq.
  (if file1
    (progn
      (setq sline1 (read-line file1)
            stext1 (substr sline1 1 6)
            sFmtPath (vl-filename-directory sfile1)
      ) ;_ End setq.
      (close file1)
      (cond    ; Condition A.
        ((= "AC1032" stext1)
         (alert
           (strcat
             "Header = AC1032."
             "\nFile " sfile1
             "\nis saved in the 2018 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A1.
        ((= "AC1027" stext1)
         (alert
           (strcat
             "Header = AC1027."
             "\nFile " sfile1
             "\nis saved in the 2013 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A2.
        ((= "AC1024" stext1)
         (alert
           (strcat
             "Header = AC1024."
             "\nFile " sfile1
             "\nis saved in the 2010 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A3.
        ((= "AC1021" stext1)
         (alert
           (strcat
             "Header = AC1021."
             "\nFile " sfile1
             "\nis saved in the 2007 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A4.
        ((= "AC1018" stext1)
         (alert
           (strcat
             "Header = AC1018."
             "\nFile " sfile1
             "\nis saved in the 2004 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A5.
        ((= "AC1015" stext1)
         (alert
           (strcat
             "Header = AC1015."
             "\nFile " sfile1
             "\nis saved in the 2000 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A6.
        ((= "AC1014" stext1)
         (alert
           (strcat
             "Header = AC1014."
             "\nFile " sfile1
             "\nis saved in the R14 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A7.
        ((= "AC1012" stext1)
         (alert
           (strcat
             "Header = AC1012."
             "\nFile " sfile1
             "\nis saved in the R13 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A8.
        ((= "AC1009" stext1)
         (alert
           (strcat
             "Header = AC1009."
             "\nFile " sfile1
             "\nis saved in the R11/R12 file
            ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A9.
        ((= "AC1006" stext1)
         (alert
           (strcat
             "Header = AC1006."
             "\nFile " sfile1
             "\nis saved in the R10 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A10.
        ((= "AC1004" stext1)
         (alert
           (strcat
             "Header = AC1004."
             "\nFile " sfile1
             "\nis saved in the R9 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A11.
        ((= "AC1003" stext1)
         (alert
           (strcat
             "Header = AC1003."
             "\nFile " sfile1
             "\nis saved in the Version 2.60 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A12.
        ((= "AC1002" stext1)
         (alert
           (strcat
             "Header = AC1002."
             "\nFile " sfile1
             "\nis saved in the Version 2.50 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A13.
        ((= "AC1001" stext1)
         (alert
           (strcat
             "Header = AC1001."
             "\nFile " sfile1
             "\nis saved in the Version 2.22 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A14.
        (T
         (alert
           (strcat
             "Header = "
             stext1
             "\nFile " sfile1
             "\nis saved in an unknown file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A15.
      ) ;_ End condition A.
    ) ;_ End progn.
    (prompt "\nNo file selected. ")
  ) ;_ End if.
  (prin1)
) ;_ End C:FMT

July 10, 2017

Autodesk Answer Day - APAC


The next Autodesk® Answer Day, for Asia-Pacific customers, will be held on Thursday, July 13, 2017. The event will be held in English and Chinese, and will cover AutoCAD®, AutoCAD® Mechanical, Inventor®, and Revit®. The events will be held in the respective product forums; refer to this Autodesk Community Announcement page for details on the times and links to the forums.

June 30, 2017

Dynamo: Rounding Up

I was looking to try to automate some life-safety-related tasks in Revit® today, specifically related to occupant load calculations, and set out to create a Dynamo graph. I wanted to be able to round up the Area parameter value derived from an Area object, so that a whole number would be used (matching the calculated value in a Schedule) and I also wanted to round up any "fraction of a person" that results from dividing the Area value by the area per occupant value (as specified in the governing building code). I did not see a "Round Up" node in the standard Dynamo nodes, just two different Round nodes, one to round to the nearest whole number and one where you can specify the number of decimal places in the rounded number. (I am currently using the 1.2 release - yes, I know I am behind.) So I set out to create my own Round Up node. NOTE: As my interest here is with positive numbers and rounding up to the next largest whole number for values that are not already a whole number, I did not worry about how negative numbers should be treated (should they round toward or away from zero?). If your application does involve negative numbers, you will need to determine which direction they should round, and adjust the node definition accordingly.

The image above shows the definition of the Round Up node that I created. (As always, you can select an image to see the full-size version.) The math behind it is fairly straightforward:
  • The Input node takes a number as input.
  • The Math.Floor node takes the input number and truncates any fractional part.
  • The x subtract y. node subtracts the result of the Math.Floor node from the original number, to determine the fractional value (if any).
  • The x less y? node compares that fractional value to zero, generating a value of true if it is greater than zero, or false if not.
  • The If node uses that true/false value as the test input, and passes along a value of 1 if the test value is true or 0 if the test value is false.
  • Finally, the Adds x to y. node adds the truncated result of the Math.Floor node to the value of the If node, and passes this along to the Output node as the result of this custom node.

So, if there is a fractional amount, one is added to the whole number portion of the input value; otherwise, zero is added to the whole number portion, which is "rounding up".

While testing this as part of my Dynamo graph, I noticed that one of the Area values, which was reporting as 100 square feet in Revit (after using the RoundUp function in Revit) was unexpectedly rounding up to 101. I took a look at the node values and discovered that an Area that was inside boundaries that formed a 10'-0" square was reporting an area of 100.000000000002 square feet inside Dynamo. While I always want to round any true fractional value up, I decided that it was unreasonable to assign two occupants to that 100 square foot Office (at 100 square feet per occupant) for a non-zero value in the twelfth decimal place. In my mind, that is a computational error. So I came up with another custom node, called Round Up with Floor (see image below).
This custom node definition has all of the same nodes as the Round Up node, except the Code Block that supplies the zero value to the x less y? node is replaced with a second Input node. That allows you to specify the value above which the rounding up will occur. I still need to do additional testing to determine at what value the RoundUp function in Revit will actually round up. For my first test of the Round Up with Floor node, I used a floor value of 0.000001 (one millionth of a square foot), and that eliminated the rounding up of the one area with the very small fractional amount.

June 25, 2017

In What Version of AutoCAD Was My File Saved?

As I start thinking about deploying AutoCAD® Architecture and AutoCAD® MEP 2018, I have been considering how to manage having multiple file formats in use at the same time. Not that we have not had to deal with that in the past; but we have been primarily using 2013-format releases for quite some time, so I will need to make and keep users aware of the fact that once a file is saved in the 2018 format, there is no going back.

One "trick" I personally have used to check on the file format of a file prior to opening it is discussed in this Autodesk Knowledge Network article. You can determine the file format of an AutoCAD® drawing file by opening the file in a plain text editor (like Notepad) and looking at the first six characters. That article lists the "codes" for the 2000 through 2013 file formats. Shaan Hurley, in this article in his Between the Lines blog, has a more complete listing of the codes, including the fact that the new 2018 file format is AC1032. Scroll down to the bottom of the article, under the DWG File History header, for the full listing.

One drawback to that trick is that really large files can take quite some time to open in Notepad, and there is always the risk (however small) that you could accidentally make a change and then save the file in Notepad. It occurred to me that an AutoLISP routine ought to be able to use the read-line function to read the first line of a drawing file, extract the first six characters, and then report the results; this proved to be true. You do have to have an instance of AutoCAD open first, but if you do, the routine works much faster than opening in Notepad for large files, and there is no risk of changing the file. I chose to limit the versions for which it tests to the AC1001 (Version 2.2) format. I was not able to fully test all of those, as I was unable to find a file in my archives that was last saved in anything earlier than Release 9 (AC1004). If your archives include files of earlier vintage, you could extend the code for the earlier versions listed in Shaan's article, assuming that those older files have the "code" in the first six characters.

(defun C:FMT ( / file1 sfile1 sline1 stext1)
  (setq sfile1 (getfiled "Select Drawing File" "" "dwg" 0)
        file1  (open sfile1 "r")
  ) ;_ End setq.
  (if file1
    (progn
      (setq sline1 (read-line file1)
            stext1 (substr sline1 1 6)
      ) ;_ End setq.
      (close file1)
      (cond    ; Condition A.
        ((= "AC1032" stext1)
         (alert
           (strcat
             "Header = AC1032."
             "\nFile " sfile1
             "\nis saved in the 2018 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A1.
        ((= "AC1027" stext1)
         (alert
           (strcat
             "Header = AC1027."
             "\nFile " sfile1
             "\nis saved in the 2013 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A2.
        ((= "AC1024" stext1)
         (alert
           (strcat
             "Header = AC1024."
             "\nFile " sfile1
             "\nis saved in the 2010 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A3.
        ((= "AC1021" stext1)
         (alert
           (strcat
             "Header = AC1021."
             "\nFile " sfile1
             "\nis saved in the 2007 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A4.
        ((= "AC1018" stext1)
         (alert
           (strcat
             "Header = AC1018."
             "\nFile " sfile1
             "\nis saved in the 2004 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A5.
        ((= "AC1015" stext1)
         (alert
           (strcat
             "Header = AC1015."
             "\nFile " sfile1
             "\nis saved in the 2000 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A6.
        ((= "AC1014" stext1)
         (alert
           (strcat
             "Header = AC1014."
             "\nFile " sfile1
             "\nis saved in the R14 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A7.
        ((= "AC1012" stext1)
         (alert
           (strcat
             "Header = AC1012."
             "\nFile " sfile1
             "\nis saved in the R13 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A8.
        ((= "AC1009" stext1)
         (alert
           (strcat
             "Header = AC1009."
             "\nFile " sfile1
             "\nis saved in the R11/R12 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A9.
        ((= "AC1006" stext1)
         (alert
           (strcat
             "Header = AC1006."
             "\nFile " sfile1
             "\nis saved in the R10 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A10.
        ((= "AC1004" stext1)
         (alert
           (strcat
             "Header = AC1004."
             "\nFile " sfile1
             "\nis saved in the R9 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A11.
        ((= "AC1003" stext1)
         (alert
            (strcat
             "Header = AC1003."
             "\nFile " sfile1
             "\nis saved in the Version 2.60 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A12.
        ((= "AC1002" stext1)
         (alert
           (strcat
             "Header = AC1002."
             "\nFile " sfile1
             "\nis saved in the Version 2.50 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A13.
        ((= "AC1001" stext1)
         (alert
           (strcat
             "Header = AC1001."
             "\nFile " sfile1
             "\nis saved in the Version 2.22 file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A14.
        (T
         (alert
           (strcat
             "Header = "
             stext1
             "\nFile " sfile1
             "\nis saved in an unknown file format."
           ) ;_ End strcat.
         ) ;_ End alert.
        ) ;_ End condition A15.
      ) ;_ End condition A.
    ) ;_ End progn.
    (prompt "\nNo file selected. ")
  ) ;_ End if.
  (prin1)
) ;_ End C:FMT

Here is an example of the alert message that will be displayed.

May 25, 2017

AutoCAD® 2018 Users Alert

If you have AutoCAD® 2018 or any vertical built on AutoCAD 2018 installed AND you installed the 2018.0.1 update during the short period of time that was available BUT have not yet installed the 2018.0.2 update, please do so immediately. The 2081.0.1 update included code from the pre-release Beta version that will cause the license to time out on June 1, 2017. Installing the 2018.0.2 update will remedy this situation. If you do not act, you will not be able to run AutoCAD 2018 on June 1.

How Can I Tell if I Have the 2018.0.1 Update Installed?
At the command line, type ABOUT and then press the ENTER key.
  • For AutoCAD or AutoCAD LT®, look at the Product Version line (the only one there).
  • For vertical products, such as AutoCAD® Architecture, pictured above, look at the Built on line.

If you see
  • O.49.0.0: You have the shipping version installed, without any updates. You are NOT impacted by the license timeout issue, however, it is recommended that you install the 2018.0.2 update to take advantage of the fixes contained therein.
  • O.61.0.0: You have the 2018.0.1 update installed, and you WILL BE AFFECTED by the license timeout. You do NOT need to uninstall anything, simply install the 2018.0.2 update. See the Autodesk Knowledge Network article link below for more information on the 2018.0.2 update.
  • O.72.0.0: You already have the 2018.0.2 update installed. You are NOT impacted by the license timeout issue and need do nothing further with regard to this.

The number of people who installed the 2018.0.1 update who have not already installed the 2018.0.2 update is expected to be small, but you do not want to be "that guy." Take a few moments to check your version now, and, if it is 0.61.0.0, install (or have whomever is in charge of updates install) the 2018.0.2 update now, and make June 1 just another Thursday.

This Autodesk Knowledge Network article gives an overview of what the update includes. If you never installed the 2018.0.1 update, no worries, the 2018.0.2 update includes those fixes, too. There are links at the bottom of the article to the full README for the updates, if you are interested in all of the details.

Read more about the 2018.0.1 Update issue in this article in the AutoCAD Blog.

Note: Should your version number be less than O.49.0.0, then you have a pre-release beta version installed. This will timeout on June 1, 2017. Your only recourse is to uninstall it and then to install the shipping version, if you are entitled to do so.

May 23, 2017

ACA: Wall Rotation Property

I came across a request today from someone who wanted to be able to set up a Display Theme based on the rotation of Walls, to graphically call out any that were close to, but not quite orthogonal. Rotation is not one of the automatic property sources for Walls, but it is a property of a Wall and that data can be extracted using a Formula property. The raw data is in radians, but you can apply the appropriate factor to covert that to degrees in the Formula property. Here are the formulas I created to make the Wall rotation value available as a property that could then be the basis of a Display Theme:

Radians
On Error Resume Next
Set acadApp = GetObject(,"AutoCAD.Application")
Set wallObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
RESULT = CDbl( wallObj.Rotation )

Degrees
On Error Resume Next
Set acadApp = GetObject(,"AutoCAD.Application")
Set wallObj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
pi = 4 * Atn( 1.0 )
RESULT = CDbl( (wallObj.Rotation * 180.0) / pi)

In both cases, the formulas above assume that, in the same Property Set Definition, an automatic property called ObjectID has been added, referencing the ObjectID automatic property source. The reference to this property in the formula needs to be made by double clicking on that property in the lower left pane of the Formula Property Definition dialog, when creating the Formula property.

Please note that I have had issues with Formula properties that use the Set acadApp = GetObject(,"AutoCAD.Application") line to get the AutoCAD application object, when multiple versions of AutoCAD are open at the same time. Something to keep in mind, should you see Formula properties failing, particularly ones that had worked before. (I am not certain whether the same effect occurs if you have multiple instances of the same version running simultaneously; I rarely do that, but often have multiple versions running at the same time.)

May 21, 2017

ACA-AMEP 2018: ByLayer Values in Objects in External References

5/30/2017 UPDATE:
On 5/26/2017, AutoCAD® Architecture 2018.0.1 Update and AutoCAD® MEP 2018.0.1 Update (in both 32-bit and 64-bit versions) were released, and are supposed to resolve this issue. I have not yet had an opportunity to install this to verify. You can read the full release notes here.


There is a bug in the 2018 release of AutoCAD® Architecture and AutoCAD® MEP that affects how the "ByLayer" property value of an AEC object in an external reference is being resolved. If a component is assigned to Layer 0 and then the Color, Linetype, Lineweight, Plot Style, etc. is set to ByLayer, the value assigned to the layer of the parent AEC object should be assigned. When the object is directly in the current file, that works. But if that file is externally referenced into another file, the property value of the layer of the external reference is assigned, rather than the property value of the layer of the parent AEC object. In the image below, the left side shows a Door that has been placed on a layer called A-Door-Demo. The visible components are assigned to Layer 0, with ByLayer Color and Linetype. Layer A-Door-Demo has Color set to 32 and Linetype set to HIDDEN2. On the right side, that file has been externally referenced into another file, and placed on a layer called A-Anno-Refr, which is set to Color 212 and Linetype Continuous. As you can see, the Door components have picked up the Color and Linetype from the layer on which the external reference is placed, not from the layer of the parent Door object.
The suggested workaround, changing "ByLayer" to "ByBlock" works, but would be a major undertaking if you have many components assigned to Layer 0 with ByLayer attributes. We will hold off on deploying 2018 until this is fixed.

As noted in this Autodesk Knowledge Network article, Autodesk is aware of the problem and working on a fix. Keep an eye on that article; I suspect that when a fix is released, the article will be updated to reflect that.

April 25, 2017

ACA/AMEP 2018: New Features Part 2

File Navigation Dialogs
The dialogs for commands that ask for a file to be selected or a folder for a file to be saved, such as the OPEN, ATTACH and SAVEAS commands, will now retain any column sort order you set from one use to the next. Each "type" of file dialog has a separate sort setting. SAVE and SAVEAS will share the same sort, but ATTACH can be different, and must be set separately. The sorting is remembered across sessions of AutoCAD, also.

Drafting Settings Dialog
This dialog is now resizable.

Quick Access Toolbar and the Layer Control
The Layer Control has been added to the list of tools that can be added to the QAT by using the drop-down list at the right end of the toolbar. It is turned off initially, but is there on the drop-down list, waiting for you to select it, if desired.

System Variable Monitor on the Status Bar
The System Variable Monitor tool will appear in the tray at the right end of the Status Bar when a System Variable that is being monitored is changed from its preferred value. In previous versions, you could left click on this tool, and the System Variable Monitor dialog would open, allow you to review the settings and status, and reset all monitored variables to their preferred values. You can still do that in 2018; new is the ability to right click on the tool to get a context menu with three choices:
  • Configure System Variable Monitor: Selecting this is the same as left clicking on the tool.
  • Reset System Variables: Reset all monitored System Variables to their preferred values without opening the dialog.
  • Display Notification: Balloon notification of changes to monitored System Variables is turned on if there is a check mark in front of this item. Select this item from the context menu to remove the check mark, if present, or to add the check mark, if absent.

Off-screen Selection
If you start a selection window when zoomed in, and have to either pan or zoom out/zoom in to another section of the drawing to select the opposite corner, such that your first corner is now off screen, the off-screen objects encompassed by the selection window will now be selected.

Linetype Gap Selection Improvements
The ability to select objects with a non-continuous linetype, or have the gaps in the linework of such objects be recognized by commands like EXTEND has now been extended to both complex and DGN linetypes. Complex linetypes are those that have text or shapes embedded into the linetype. This feature also now works for all object types, including Splines and Polylines with non-zero width.

Share Design View Enhancements
Introduced with the 2017 release (on the A360 ribbon tab, on the Share panel, select the Share Design View tool to start the process for the current drawing, which must be saved), this feature allows you to upload a drawing file to an anonymous location in the Autodesk A360 cloud, and then share views of the drawing with others, who only need to have a supported browser (Chrome, Firefox and other browsers supporting WebGL 2D graphics) to view the file. The actual DWG file is not made available, just the ability to view it. By default, uploaded files expire in 30 days; newly added is the ability to find previous uploads and to extend the expiration date, if desired.

April 22, 2017

ACA/AMEP 2018: New Features Part 1 - External Reference Improvements

I usually start out my first "new features" article for a given release by remarking that I have been busy, and apologizing for the delay in preparing the article. While I am indeed busy this year as well, and that has contributed to the tardiness of this article, another contributing factor is my lack of enthusiasm over the lack of new AutoCAD® Architecture and AutoCAD® MEP features in the 2018 release. My understanding is that you all (meaning, all of you end users out there) have been telling Autodesk that you would rather have them fix things that need fixing in the existing features, rather than adding new features. While I like fixing bugs or adjusting the design of a feature to better suit typical industry workflows as much as the next person (maybe more so), in my mind most of that effort should be in the province of a service pack or hotfix, unless it truly is a major change from the original feature design and the original feature design more or less worked as designed. This is particularly upsetting given that the pain of a new file format is being inflicted, without any offsetting new features that required a new file format to implement.

So, a number of items that had been reported as not working as expected have been fixed. Support for 4k monitors has been integrated for AutoCAD Architecture and AutoCAD MEP dialogs, palettes, etc. (I do not have 4k monitors, so I am taking their word on that.) And, all of the wonderful new things added to the core AutoCAD feature set have been integrated into AutoCAD Architecture/MEP. The balance of this article will look at the improvements made to external references.

External Reference Improvements
  • Relative path is the new default when attaching an externally referenced file to a drawing. Use the REFPATHTYPE System Variable to set a different default path type: 0 = No Path, 1 = Relative Path and 2 = Full Path.
  • Use of a relative path for an externally referenced file no longer requires that the host file be named/saved. Instead, the full path will temporarily be shown in the Saved Path column, with a preceding "*" and, in the Details section, the Pending Relative Path property will show as "Yes". Once the file is saved, any pending relative paths will be resolved and show the relative path in lieu of the temporary full path.
  • If you save a file to a new location and that file has relatively pathed external reference files attached, you will be prompted as to whether or not the relative paths should be updated for the new location. If you only plan to save this one file to the new location and you want the relatively pathed external references to be found, you will most likely want to update the relative paths. If you eventually intend to move (or copy) the relatively referenced files such that they will be in the same relative location, then not updating the paths may be the appropriate choice.
  • There are two new right-click contextual menu choices when dealing with an externally referenced file that is "not found".
    • Select New Path: This option provides the opportunity to browse to a new location (path) for the "not found" file. If there are additional "not found" external references, you will be asked if the new path should be applied to those, as well.
    • Find and Replace: This option allows you to select one or more external references and then specify a target path (Find saved path) and specify a replacement path (Replace with). For ONLY the external references that were selected when you right clicked and chose Find and Replace, AutoCAD will look for any that have the target path and will replace that path with the replacement path.

      If all of the selected external references currently have the same path, that path will be offered as the initial default in the Find saved path edit box. If you select external references with different paths, you will have to supply both the Find and the Replace paths. Note that if you use the ellipsis button at the right side of either edit box, you will get the full path of the selected folder, regardless of the path type shown in the Find edit box, or the path type used for the selected external references. You can manually edit that path to be a relative path, if desired. If the external reference uses a relative path, providing the equivalent full path in the Find box will not result in a match. In limited testing, providing the full path as the Replace path for an external reference that is currently set to relative path did result in the relative equivalent to that full path being applied.

      Find and Replace also appears on the right click context menu when selecting "found" external references and can be used to repath multiple references at one time (provided that the current and replacement paths are the same for all selected external references). Note also that the text entered in both edit boxes has to be an actual path. You cannot just enter the text you want to replace in the Find edit box and the text that you want to substitute in the Replace edit box; the complete path must be used in both (whether a full path or a relative path).

  • When right clicking on one or more selected references and using the Change Path Type context menu item, if all of the selected items currently have the same path type, that path type will be disabled in the cascading contextual submenu. If there are multiple path types in the selected references, then all three options will be enabled.
  • The Open option right click context menu option is no longer disabled for unloaded external references.
  • If you rename an unloaded external reference on the External References palette, it will no longer automatically be reloaded. You will need to reload the reference in a separate action if and when you want it reloaded. Note: As in previous versions, using the RENAME command, and the Rename dialog, to rename an unloaded external reference will leave the external reference unloaded. New in 2018, if you use the Rename dialog or the CLASSICXREF command's Xref Manager to rename an external reference, that change will show immediately in the Reference Manager palette, without the need to reload the renamed reference.
  • There has also been a minor change to the dialog that appears when opening a drawing with external references that cannot be found. Instead of referring to these files as "missing", they are now noted as "Not Found". The text on the button that opens the Reference Manager has also been simplified.

April 11, 2017

ACA: Property Set Definitions, Applies To - Just How Many Polyline Types Are There?

If you ever want to do any scheduling in AutoCAD® Architecture that involves polylines, you will find that there are three different polyline types to which your Property Set Definition can apply. You could select all three, to be safe. Here is an explanation of what each type is, should you want to be more precise (or want to explicitly exclude any of the types).

  1. Polyline: This choice applies to "modern," so-called "light-weight" LWPOLYLINEs. If you have PLINETYPE set to 1 or the default value of 2, then the PLINE command will make this type. (If it is set to 2, and you open an R14-format drawing (or older), any existing polylines will be converted to the the "new" format; if it is set to 1, existing polylines from R14 or older format drawings are not converted.)
  2. Polyline (2D): This choice applies to the old format polylines. You have to set PLINETYPE to 0 to create new polylines in that format. Unless you have a compelling reason to do so, I would not recommend that. The LWPOLYLINE format results in smaller file sizes and faster processing.
  3. Polyline (3D): This choice applies to 3D polylines created with the 3DPOLY command. Polylines created by the PLINE command are "flat" or 2D; all vertices have the same Z-coordinate in the UCS that was current at the time of creation, set by the first point selected. In a 3D polyline, the Z-coordinate of each vertex is independent of those of the other vertices.
If you select a polyline to which the Polyline choice applies, the Properties palette will show it as "Polyline" at the top. If you use the LIST command, it will indicate that it is a "LWPOLYLINE".

If you select a polyline to which the Polyline (2D) choice applies, the Properties palette will show it as "2D Polyline" at the top. If you use the LIST command, it will indicate that it is a "POLYLINE".

If you select a polyline to which the Polyline (3D) choice applies, the Properties palette will show it as "3D Polyline" at the top. If you use the LIST command, it will indicate that it is a "POLYLINE".

Here are the Automatic Properties that are available with each type. Note that the Polyline and Polyline (2D) have the same Automatic Properties; Polyline (3D) has some of the same, but lacks the Closed, Elevation and Thickness properties.