December 30, 2013

Revit: Restricting a User-Input Value to a Specific Increment

There are times when you are creating a family to represent an object that can have multiple values for a particular parameter, such as a length, that you would prefer not to create a type for each possible length. Using an instance-based parameter allows you to do so, as this allows the end user to set the value as needed on each instance. But what if the object you are modeling only comes in specific increments? How can you prevent the end user from entering a value that is not available? You can add another instance-based parameter and by entering a formula, you can round the user-input value to the desired increment. If the user could enter values that would be invalid, such as zero or negative values for a length parameter, or a value outside of the range available for the object, you can add one or more additional instance parameters and use a formula to assure an invalid value is not used.

As an example, I created an upside-down "T" shaped Generic Model Family, where the length is restricted to 6" increments, while the width can be any value.
The rounding functions in Revit®, Round, Roundup and Rounddown, require a unit-free number as an argument, so in the formula for the LengthRounded parameter, the user-input value is divided by 6". This value is then rounded (up in this case) and that result is multiplied by 6" to restore the units and get the rounded value. The LengthActual parameter then checks the rounded result and passes that value through if it is greater than 0 feet; otherwise the minimum value of 6" is set. The Length Actual parameter is what drives the family geometry.

Since formula-driven, instance-based length parameters will not generate stretch grips in Revit, I added an additional reference plane, UserInputEnd, and assigned the LengthUser parameter to a dimension between it and the Front reference plane so that stretch grips for the length would appear in a project. None of the family geometry is locked to the UserInputEnd reference plane. You can see the family and the family in a project in the following Chronicle.

December 21, 2013

ACA: Custom Drawing Scales, The Movie

I was trying out the new version of Project Chronicle and decided to base my first video on my previous blog article. So if you prefer watching video to reading text with the occasional screen shot, take a look at the video below. You may notice a "jump" in the video after the first custom scale is added. I figured that after seeing one scale added, there would be little interest in watching me type in the five other scales, so I cut that part out of the video.

December 19, 2013

ACA: Custom Drawing Scales

The easiest way to add drawing scales that you want available for all drawings is is to use the SCALELISTEDIT command (on the Annotate ribbon tab, Annotation Scaling panel, Scale List tool; or on the Drawing Window Status Bar, use the Annotation Scale control and select the Custom item on the popup list) to add these scales to your drawing template files. This will not, of course, affect any existing drawing files that you have.

"Vanilla" AutoCAD® offers the ability to customize the default scale list, with separate lists for Metric- and Imperial-unit drawings, by selecting the Default Scale List button in the Options dialog, on the User Preferences tab.
These lists are stored in the registry and are used by the Reset button in the Edit Drawing Scales dialog. If you use this feature to put additional scales in the default list(s), you can then use the Reset button to get these scales in an existing drawing using the SCALELISTEDIT command.

AutoCAD®Architecture, on the other hand, does not offer the ability to edit a default scale list,
and even if you run ACA as AutoCAD, changes made to the default lists then will not be honored when later running ACA as ACA. You can still use the SCALELISTEDIT command to add drawing scales to your template file(s), so that new files created with that(those) template file(s) will have them.

In order to avoid having to add the additional scale(s) manually to existing files, you can start a new file from your edited template file. Set one of the added scales current, and add an annotative MText object. If you have more than one added scale, select the MText object, right click, and choose Annotative Object Scale > Add/Delete Scales from the context menu.
Use the Add button in the Annotation Object Scale dialog, and select the additional scales in the Add Scales to Object dialog.
Select OK twice to add the scales to the MText object. You can now either save this file or use the WBLOCK command to create a file that containes the MText object. Use the INSERT command to insert this file into any other file in which you wish to add the custom scales, and the scales will come along for the ride. You can even cancel the INSERT command when prompted for the insertion point for the block, and then purge the block definition from the file - the added scales will remain.

December 17, 2013

Revit Phasing and Demolition: Required Reading

The need for a demolition phase has been a topic of discussion in my office. I do not see the need, in general, and feel that it creates more work to show essentially the same thing. Steve Stafford says it better than I can, so if you are dealing with this issue as well, you may want to read his article on the subject. There is additional discussion in the comments on that article, so be sure to read those, as well.

December 14, 2013

ACA: File Select Dialogs Open Slowly

I had been noticing that the file dialogs in AutoCAD® Architecture 2010 were opening somewhat slowly over the last several months and became exceptionally slow this past Wednesday. I was not experiencing that issue in ACA 2014. I suspected that somewhere in my Options I had a bad file/folder reference or a folder that had a broken Windows shortcut in it. Things were so bad that after I completed the task at hand, I took the time to check out each reference, but did not find any problems. I was about to give up, when the problem planted itself right in front of me and amazingly enough I recognized it.

I make extensive use of the fact that AutoCAD allows you to save the current folder in the "shortcut bar" at the left side of most "Select File" dialogs, such as the one that appears when you issue the OPEN command. Unfortunately, I am not always diligent about removing older ones. I have been short on hard drive space on my computer for the last year or so, and have occasionally made DVDs of my personal project folders for older projects and then removed them from my hard drive. This turned any shortcuts to these project folders in AutoCAD into broken links, and waiting for these to time out was what had been causing the delay in opening the "Select File" dialogs. What made the performance on Wednesday exceptionally bad was that the server on which projects started in 2011 were stored went down today, and I had a number of shortcuts to folders on that server. Fortunately, AutoCAD/Windows gives you a clue that the link has become broken, by changing the folder icon from the manila, "3D" folder to a flat, white folder. Thanks to the server issue, I had so many of these white folders that I could not help but notice them. Once I removed all of them, the Select File dialog opening time returned to normal.

December 12, 2013

ACA: Formula Property to Determine if a Block Instance is a Dynamic Block

You can use the following code in an AutoCAD® Architecture Formula Property in a Property Set that applies to Block References to determine if the Block Reference is a Dynamic Block.
set acadApp = GetObject(,"AutoCAD.Application")
set obj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
RESULT = obj.IsDynamicBlock

As in the previous example, [ObjectID] is a properly created property reference to an automatic property in the same Property Set, named ObjectID, which references the Object ID automatic property source. This formula will return a value of TRUE if the block reference is a Dynamic Block and FALSE if the block is a "regular" block. The property can be used as the condition for an IF Statement, if you need another Formula property to take different actions based on whether or not the block reference is a dynamic block.

December 10, 2013

ACA: Obtaining the Effective Name of a Dynamic Block in a Formula Property

While Dynamic Blocks and ACA do not always play nicely, there are some who want to take advantage of both Dynamic Blocks and the AutoCAD® Architecture Schedule feature. One challenge is that the Name automatic property source may return an anonymous block name rather than the Dynamic Block name; for example, when a Dynamic Block with a stretch action is stretched. Fortunately, you can obtain the orignal block name from the EffectiveName property of the Dynamic Block instance, in a Formula property, using the the following VBScript code:
set acadApp = GetObject(,"AutoCAD.Application")
set obj = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
RESULT = obj.EffectiveName

The Property Set Definition that includes the Formula property will also need to have a property that references the Object ID automatic property source. In the example code above, this property has the default ObjectID name, and the [ObjectID] text in the formula represents a properly created property reference, created by double-clicking the property name in the Insert Property Definitions box in the lower left of the Formula Property Definition dialog.

December 03, 2013

Revit: Hosting Face-Based Light Fixtures to Ceilings in Linked Files

We ran into an issue at the office today, and I wanted to document the solution for my own future reference. Our firm has architects and engineers in-house, and each discipline typically works in separate models that are then linked into each other. This particular project was being done in the 2012 versions of Revit MEP, Revit Structure and Revit Architecture. The electrical engineers found that they were not able to place face-based light fixture families in their model, and host them to the ceilings that were modeled in the linked architectural model. Reflected ceiling plan views were being used and the ceilings were visible, but the fixtures would only host to the Walls.

It turned out that the Ceiling model category was turned off in the affected views in the Electrical model. This did not prevent the linked architectural model from displaying the ceilings, and they were also TAB-selectable in the Electrical model. But it did prevent Revit MEP from "seeing" them as a potential host. Once the ceiling category in the electrical model was turned back on in those views, Revit was able to find the ceilings and host fixtures to them. It was necessary to check the Show categories from all disciplines toggle in order to do this.

November 30, 2013

ACA: Offset External References, Location Properties and Schedule Tags

If you have ever externally referenced several files into one host file, and had Schedule Tags placed within the externally referenced files that displayed property values that were from or based on Location properties, you may have found that in the host file, the Schedule Tags did not display the expected values. One common example would be the use of a Door Tag that displays an ID value for the Door that is based in part on the associated room number, with the room number value being brought into the Door's properties via a Location property.

Depending upon what version you are using and how you place the external references, you may find that the values displayed in the tags all display values from the Spaces of one of the external references, or that you get *Space not found* in lieu of the Space-based property value that the Location property is supposed to be reading and which shows as expected when the externally referenced file is opened directly.

Things worked as expected in ACA 2009 and earlier, but some change made in the 2010 release affected the way that Location-property-dependent values are displayed in tags nested (placed) in the files that are externally referenced. All of the examples shown in this article are done outside of the Drawing Management feature (Project Browser and Project Navigator). Because managing property data overrides is difficult outside of the Drawing Management feature, tags referencing object-based properties are usually placed directly in the file that holds the object being tagged. (My firm does it this way, and from recent posts in the Discussion Groups, it appears that others do as well.) Note also that a Schedule Table placed in the host file that is set to scan external references and which uses the external references for the selection set and applies to the same objects that are tagged by the nested Schedule Tags will display the expected values in all of the releases from 2010 through 2014; the issue is only with the values displayed by nested Schedule Tags. In all releases since 2010, it appears that nested Schedule Tags do not look for a Space from the effective location of the nested Location grip in the host file, but instead take the relative X- and Y-distances from the insertion point of the external reference to the Location grip, and then apply that X, Y coordinate relative to 0,0 in the host file and look there for a Space (or, if your Location references a property attached to an AEC Polygon, for an AEC Polygon). If it finds a Space, it reads the specified property from that Space. That works fine for one external reference, inserted at 0,0. But in a file where you are inserting several external references, you will likely not place all of the files at 0,0,0, since then it would be up to ACA to determine which of what would likely be several overlapping Spaces would be used. Assuming that each floor of the floors is above or below the others (and that they share a common 0,0 point), all of the floors would be reading values from the Spaces in the floor placed at 0,0,0.

The logical solution would be to not place any of the external references in the host file at 0,0,0 and to place then such that the building footprint relative to 0,0,0 is left open in the host file. Unfortunately, in the 2010 and 2011 releases, that results in the tags displaying *Space not found* in lieu of the expected Space-based property value. I apologize to anyone still using the 2012 release, as I do not have access to an installed version of that release, so I am not certain how that release behaves. In the 2013 and 2014 releases, a partial adjustment was made, and the tags will display the value they display directly in the external reference file, provided that there is no Space at the "mapped" location relative to 0,0 in the host file.

I have posted some sample files, in the Door tag incorrectl​y finding informatio​n from other floors thread in the Autodesk AutoCAD® Architecture General Discussion Group, based on the "Room" shown in the image above, so that you can see the effects firsthand. There are three "floor" files, for the First, Second and Third floors, and a "sheet" file into which the three floor files are externally referenced. Each floor file has a single Space onto which two doors open. The files include a modified version of out-of-the-box DoorObjects Property Set Definition, in which two new properties have been added: RoomNumberNonProjectBased is a Location property, referencing the SpaceObjects:Number property attached to the Space; NumberRoomBased is a Formula property that concatenates the RoomNumberNonProjectBased property, a period (".") and the NumberSuffix property. The left-side doors have a NumberSuffix value of "1"; the right-side doors have a value of "2". The sheet file has a modified version of the out-of-the-box Door Schedule, with the MARK column deleted and replaced by a DOOR ID column, displaying the value of the NumberRoomBased property. The Doors are tagged in each floor file with a custom Schedule Tag that also references the NumberRoomBased property. The files were created in ACA 2010, so that they can be opened in that release or any later release.

The image below is of the sheet file, opened in 2010. None of the externally referenced floor files is inserted at 0,0, and there are no Spaces below the "mapped" location of the Location grips of the Doors.
Notice that the DOOR ID column in the schedule table correctly shows the values on all three floors, yet, as shown in the enlargement of the Second Floor external reference, the Schedule Tags inside the plan external references, which tag the doors, show *SPACE NOT FOUND* instead of the room number.

If the First Floor external reference is moved so that its insertion point is at 0,0,0 and the model is regenerated, then the nested Schedule Tags on the Doors on all three external references read the room number from the First Floor external reference. The Schedule Table continues to show the correct values, as seen in the image below.

If the First Floor external reference is moved back to its previous location, away from 0,0,0, and two Spaces (ROOM 5555 and ROOM 6666) are drawn in the host file, one at each mapped location and the model is regenerated, then the nested Schedule Tags on the Doors on all three external references will read the corresponding room numbers (5555 and 6666), but the Schedule Table will show the correct values, as shown in the image below.

Opening the same files in 2013 or 2014 will give the same results, with the exception of the first sheet view image above, where instead of *SPACE NOT FOUND*, the desired room numbers will be displayed on all three floor plans, because there is no Space in the "mapped" location.

November 27, 2013

November 18, 2013

Help! If only....

This is just a quick vent post on my increasing frustration with the Help that is currently available in AutoCAD® Architecture. I appreciate that moving the online Help "online" (internet-based) allows them to update the content, and that the vehicle for doing so would not necessarily be the same as it was back in the 2010 release, when the "online Help" files were locally installed. But it seems with each release, they take away another feature and make it that much harder to actually use the Help.

My personal peeve is the removal of the Contents tab. The old search function may not have always gotten me to the page I wanted, but more often than not it got me close, and I could then pop over to the Contents tab and look in the general vicinity of the "close" page and usually find what I needed. In its current incarnation, the Help is all but totally dependent upon the Search feature, as the only other options are a few general links on the home page (thank goodness they put a link to the system variables back on that page) and the Favorites, where you can save a page once you finally find it. If the new search was all that and then some, perhaps I would not be so frustrated. Here is an example of why I am frustrated:

I was trying to get up to speed on object transparency, and I had become aware that when plotting, transparency is turned off, by default, for performance reasons. I could see the toggle to enable transparency in the plot dialog, but I wanted to know more about it, and whether there was a System Variable that could also control that setting. So I did a search for PLOT TRANSPARENCY filtered for User information, and the second hit was the Plot Dialog Box article in the Help, which I selected and scrolled down to the section on Plot Options, which had the description of the Plot Transparency toggle.
As I suspected, there was a System Variable, and I wanted to know more about it. Unfortunately, the PLOTTRANSPARENCYOVERRIDE text in the Help was not a hyperlink. "No problem," I thought, "my current search is for PLOT TRANSPARENCY, surely PLOTTRANSPARENCYOVERRIDE must be in the search results." So I scrolled down the first page of results and did not find it. I went to the second and third pages and came up empty there, too. (For the record, it was there, the twentieth item on page five. I typed two thirds of the title of that article as my search criteria. How could it possibly be the 120th result?)

After scrolling through the third page, I grew weary and decided to take advantage of the fact that I already knew the name of the System Variable. Perhaps the problem was that I had typed a space between "PLOT" and "TRANSPARENCY". I removed that space and redid the search, only to find that PLOTTRANSPARENCY generated no results.
The Help did kindly offer an alternate search term, which I gamely tried (even though it introduced extraneous text). I was very disappointed to find that there were no search results for plottransparenz, either. Why offer an alternate search term if there are no results for it?

Finally, I did what I apparently should have done before even looking through the current search results, and changed the search string to PLOTTRANSPARENCYOVERRIDE. Searching on the entire name resulted in a much-reduced list of hits and put the one I wanted right at the top. All well and fine, since I already knew the name of the System Variable, but what about times when I half-remember part of the name? Why is the search limited to whole words?

After the fact, I did discover one somewhat hidden gem in the current Help. If you select the tool with the funnel icon to the right of the user type drop down, you have the opportunity to filter the search results to just Commands, just System Variables or just Commands and System Variables. Had I done this on my original search terms of PLOT TRANSPARENCY, the article I wanted would have been the first search result and I would have been somewhat less frustrated. The filter does not resolve the issue where partial System Variable or Command names do not generate any results (unless that part exists as a free-standing "word" somewhere in the text). But it will save me from having to scroll through five pages of results to find something that should have been on page one from the start.

Note that unchecking the "Include Autodesk Web Results" toggle only removed four items from my original search, and the PLOTTRANSPARENCYOVERRIDE page was still on the fifth search results page, moving all the way up to number 118.

October 19, 2013

ACA: AEC Content on the Ribbon

In December of 2009, I contributed an article to AU Tech Talk, about adding tools for AEC Content to the ribbon in AutoCAD® Architecture. That article no longer appears to be available on the Autodesk website, so I am reposting it here:

The out-of-the-box AutoCAD Architecture ribbon tabs include a number of tools that allow you to add AEC content such as elevation and section marks, keynotes, leaders, display themes, schedule tags and schedule tables. Rather than duplicate the abilities of tool palette tools to import styles or definitions from a source file when necessary and to preset property values, these ribbon tools “run” a tool palette tool, through the AECRIBBONTOOL command.

To create a ribbon tool for your own custom content, you will need a tool palette tool for the content and an editable customization file in which you can add a ribbon tool.

Tool Palette Tool
Any tool palette tool that exists in the current workspace can be referenced from a ribbon tool, whether or not the palette on which the tool resides is included in the current tool palette group. If the ribbon tool is to be shared with others, everyone will need to have the referenced tool and you will not want the tool or the palette on which it resides to be easily deleted or edited. The out-of-the-box setup achieves this by having the ribbon tools reference tools that are on a read-only palette that is not part of any of the out-of-the-box tool palette groups. To see this palette, you need to set “All Palettes” current. Depending on what profile is set current, this palette may be called Ribbon Tools – AutoCAD Architecture (US Imperial), Ribbon Tools – AutoCAD Architecture (US Metric), Ribbon Tools – AutoCAD Architecture (UK) or a palette associated with the localized content your are using. You may want to set up a similar read-only palette for the tools that will be referenced by your ribbon tools, if you do not have a read-only, network-based tool palette location that everyone has in their workspace.
Figure 1 – Custom Ribbon Tools palette with tools to be added to the ribbon.

Customization File
Ribbon tools are created in a CUIx file by placing commands on a ribbon panel. Ribbon panels are made visible in the workspace by adding them to a ribbon tab. All of this is done within the Customize User Interface dialog (on the Manage ribbon tab, on the Customization panel, click the User Interface tool, or type CUI at the Command prompt).

Where to create your ribbon customizations will depend upon your particular situation and preferences, but it is generally considered good practice to keep your customizations separate from the out-of-the-box files whenever possible. This will make it easier to track and maintain them, as well as bring them forward when deploying a new version in the future. The example here will make use of a separate CUIx file (AECRibbonTool.cuix), loaded as a partial customization file, to create ribbon tools on a new ribbon panel, which will then be added to a new ribbon tab. A ribbon panel defined in a partial customization file can be added to a ribbon tab defined in any currently loaded customization file. So even if you want to add your new panel to an existing ribbon tab, you can define it in a separate partial customization file and limit your customization of an out-of-the-box customization file to adding the new panel to the ribbon tab.

Create and Load the Partial Customization File
  1. On the Manage tab, on the Customization panel, click the User Interface tool (or type CUI at the Command prompt).
  2. Click the Transfer tab, if it is not current.
  3. On the right side, click the Create a new customization file button.
  4. In the Save As dialog, navigate to the folder in which you want to save the new customization file, enter a name for the file (AECRibbonTool.cuix will be used below) and click Save.
  5. Click on the Customize tab. At the lower right corner, if the arrow button is pointing to the right (">"), click on that button to expand the dialog. If the button is pointing to the left ("<"), the dialog is already expanded and the button should not be selected.
  6. On the left side, near the top of the Customizations in... pane, click on the Load partial customization file button.
  7. In the Open dialog, navigate to the folder where you saved your new customization file, select the file and click Open.
Create the New Panel
  1. With the Customize User Interface dialog still open, in the Customizations in… pane, verify the drop-down list just below the title bar shows the name of your new customization file (aecribbontool.cuix); if not, select your file name on the drop-down list to filter the information shown to just that of the partial file.
Figure 2 – AECRibbonTool.cuix partial customization file loaded and selected.
  1. In the Customizations in... pane, expand the Ribbon node.
  2. Right click the Panels node, and choose New Panel.
  3. Enter a name for your panel. The example panel will be used on a ribbon tab called "AEC Content", so the panel is named AEC Content - Ribbon Tools. Press ENTER to register the name.
  4. In the Properties pane, notice that both the Name and Display Text properties have been set to your panel name. If you prefixed your panel name with the name of the tab, edit the Display Text property to show just the panel name (Ribbon Tools). This is what will show on the title bar of the panel.
  5. KeyTips provide access to ribbon tools via the keyboard (after pressing the ALT key). For panels with tools in the slideout, enter a string of up to three characters in the KeyTip property to enable the user to expand the panel from the keyboard and access the tools in the slideout. Panels without slideout tools do not need a KeyTip string.
Figure 3 - Ribbon Tools Panel properties.
  1. Repeat Steps 10 - 13 as required to create the panels you need. When you are done creating panels, click the Apply button to save the current changes to the CUIx file.
Populate the New Panel
  1. With the Custom User Interface dialog still open, in the Command List pane at bottom left, click the Create a new command button.
  2. In the Properties pane, enter the following information for the ribbon tool command:
    • Name: Enter the tool name (Vending Machine).
    • Description: Describe the purpose of the tool, for the tool tip.
    • Extended Help File: Optional! See the Customization Guide in the Help for information on creating an XAML file to provide extended help in the tool tip.
    • Command Display Name: Enter a string representing the command macro, for the tool tip (AECRIBBONTOOL Vending Machine).
    • Macro: Enter the macro string that the command will execute directly in the edit box or click on the ellipsis button to enter/edit the macro in the Long String Editor dialog. An AECRibbonTool command macro should look similar to this:
      ^C^C_AecRibbonTool Vending Machine - ribbon;
      Replace Vending Machine - ribbon with the name of the tool palette tool you want the ribbon tool to invoke.
    • Tags: Enter any key words to be associated with your ribbon tool. These are used as part of the command search feature on the Application Menu.
    • Element ID: A default value is entered automatically, and is used to reference the macro programmatically. Enter your own value, if you like.
    • Images: The small (16 x 16 pixels) and large (32 x 32 pixels) images can be specified from external files here, or use the Button Image pane to select from the available images, import a file (BMP) or draw your own.
      TIP: Click the Edit button in the Button Image pane to open the Button Editor. The light gray color at the bottom of the left column of colors will be treated as "clear" allowing the background color of the ribbon to show through, including the blue-green highlight when hovering over a button. Use this color for pixels at the edge, beyond the image proper.
Figure 4 - Vending Machine command properties.
  1. In the Command List pane, left click and drag your newly defined command up onto the Customizations in… pane, position your cursor on the Row 1 node of the ribbon panel created in Step 10 and release the mouse button to add the command to that row.
Figure 5 - Drag-n-drop the command on the panel.
  1. On the right side, you will see a preview image of the panel and have access to the Button Image and Properties panes.
    • Enter a value for the Name property only if you want the ribbon tool name to be different from the command name.
    • Choose a Button Style, which controls the button size and associated text, if any.
    • Most of the other properties will be filled in with the same values as those specified for the command, and changing them here will also change them for the command.
    • Enter up to three characters in the KeyTip property to specify a key sequence unique to the ribbon tab on which the tool’s panel will appear.
  2. Repeat Steps 15 – 18 to create and place additional commands. Add rows, sub-panels, and drop-downs to organize your tools, as desired. When you are done creating and adding commands, click the Apply button to save the current changes to the CUIx file.
Figure 6 – Ribbon Tools panel with Vending Machine as a tool and an Office Equipment split button with three tools on the drop-down.

Create a Ribbon Tab and Add the Panel
  1. Skip down to Step 24 if you intend to add your new panel(s) to an existing ribbon tab. Otherwise, with the Customize User Interface dialog still open, in the Customizations in... pane, right click on the Tabs node and choose New Tab from the context menu.
  2. Type a name for your tab (AEC Content) and press ENTER to register the name.
  3. In the Properties pane, use the Default Display property to set whether or not the tab is automatically added to the Workspace(s) when loaded as a partial CUIx.
  4. Enter up to three characters for the KeyTip property. You must do so for the tab if you want the KeyTips entered for the tools to work.
  5. Skip to Step 25 if you created a new tab for your panel(s). If you are adding your panel to an existing ribbon tab from a different CUIx file, choose All Customization Files in the drop-down at the top of the Customizations in... pane.
    • Expand the nodes to expose Customization File Name > Ribbon > Tabs for the customization file that has the target tab.
    • Expand the nodes to expose the panels to be added, under you newly created customization file (AECRIBBONTOOL).
  6. In the Customizations in... pane, left click and drag the name of the panel to be added (AEC Content - Ribbon Tools) from under the Panels node to the name of the target tab and release the mouse button.
Figure 7 - Drag-n-drop the panel on the tab.
  1. Add additional panels, if you have them. Drag the panel names under a tab to change the order of the panels on the tab.
  2. When you are done adding panels to tabs, click the Apply button to save the current changes to the CUIx file.
Add the Ribbon Tab to Your Workspace (New Tab Only)
You will now need to manually add a new tab to the desired Workspace(s). (If you set the panel to be added when loading as a partial file, you could unload the file and then reload it to add the tab to all Workspaces.)
  1. With the Customize User Interface dialog still open, set the drop-down at the top of the Customize in... pane to All Customization Files.
  2. Under the main customization file (ACA in the example here), expand the Workspaces node and select the name of a Workspace to which you want your new tab added.
  3. In the Workspace Contents pane at top right, click the Customize Workspace button.
  4. In the Customizations in... pane, expand the nodes to expose Partial Customization Files > Customization File Name (AECRIBBONTOOL) > Ribbon > Tabs.
  5. Click the toggle in front of each tab name to be added to the Workspace, or click the toggle in front of the Tabs node to add all of the tabs under the node.
  6. In the Workspace Contents pane, select a tab name and review its properties. Tabs can be included in a Workspace but not displayed, if the Show property is set to No. A ToolPalette Group can be associated with a ribbon tab, if you want.
  7. Click on the Done button to exit the editing of that Workspace.
  8. Repeat Steps 29 - 34 to add your new tab to additional Workspaces.
  9. Click the OK button to accept the changes made, close the CUI dialog and return to the drawing.
Your new tools should now be available. Click on the appropriate tab and try them out.
Figure 8 - The Ribbon Tools panel on the AEC Content tab.

September 30, 2013

ActiveX and AutoLISP Programming Tip 2

In this previous post, I provided the code for getting the AecArchBaseApplication object. This object provides access to a number of values that I previously obtained through DXF access to the dictionaries (which is no longer exposed). Assuming that you have saved the AecArchBaseApplication object to a variable called archBaseApp, the following code examples show how to obtain the noted objects and values:
;;; To get values from the currently active document, you need to get that
;;; object, which is stored in a property of the AecArchBaseApplication:
(setq docActive (vlax-get-property appAecArchBase 'ActiveDocument))

;;; With the active document in hand, you can get the AecArchBase 
;;; Preferences object:
(setq objAecArchBasePref
        (vlax-get-property docActive-AecArchBase 'Preferences)
)

;;; The AecArchBase Preferences object contains a number of values of
;;; interest, including those shown below.

;;; Model "tab" drawing scale:
(vlax-get-property objAecArchBasePref 'DatabaseScale)

;;; The auto-import Layer Standards/Layer Key Style file:
(vlax-get-property objAecArchBasePref 'LayerFile)

;;; The currently active Layer Key Style:
(vlax-get-property objAecArchBasePref 'LayerStandard)
;;; Yes, the property is named "LayerStandard", but the value stored
;;; is the current Layer Key Style, not the associated Layer Standard.

;;; The annotation plot size:
(vlax-get-property objAecArchBasePref 'TextHeight)

;;; Whether or not a DIMSCALE override is automatically created
;;; when you change scales and the current dimension style is not
;;; annnotative:
(vlax-get-property objAecArchBasePref 'CreateDimscaleOverride)

;;; The various units settings can be accessed through the Preferences
;;; object also, such as the current linear unit:
(vlax-get-property objAecArchBasePref 'LinearUnit)

Use vlax-dump-object on the AecArchBase Preferences object to see a list of all of the properties stored there.

In some cases, the values returned will be self-explanatory, such as the DatabaseScale, which is the scale factor associated with the current scale. For example, if the current model tab drawing scale is set to 1/4" = 1'-0", the DatabaseScale value will be 48.0. For items that are yes/no toggles, such as CreateDimscaleOverride, the value will be an integer. No (or false, or unchecked) is 0 (zero). Yes (or true, or checked) could be any other number, but is generally (always?) returned as -1 (negative one). Other values, such as LinearUnit, will seem more cryptic. If the current linear unit is set to "Inch", LinearUnit will return an integer value of 31. Properties such as LinearUnit return "enumerated values" (or "enums"), where each possible value is assigned a numeric value which may or may not have anything to do with the meaning it represents. The AutoCAD® Architecture Developer Help has a section that lists several of the enums used by AutoCAD Architecture and AutoCAD. Expand the AEC Base Automation Reference node and then the Enums node below that, and select the AecBuiltInUnit Enum for a listing of the various values and their meaning. As indicated in the image below, 31 is the enum for Inch.

August 23, 2013

AutoCAD: AutoComplete vs Alias

As you can see in the image above, my Command Line Suggestion list currently has FILLET as the top-ranked response after typing "F" at the Command: prompt. But it did not start out that way, and, to my annoyance, I found that the AutoComplete feature was frequently trumping my "F" command alias for FILLET. More often than not, it was executing the Express Tools FASTSEL command, no matter how quickly I hit the Enter key after typing the "F", because that command was at the top of the list. Initially, FILLET was not even visible on the list, without scrolling down. Yes, you can type additional characters to limit the choices, but the whole point of assigning a single-character command alias is to be able to execute a very-often-used command quickly.

I was made aware of this "issue" in a thread in the Autodesk® AutoCAD® Architecture Discussion Group, and discovered something of a workaround, if you both like the AutoComplete feature [I do] and yet want to be able to use command aliases. The workaround is not foolproof, and in cases where you frequently use multiple commands that start with the same letter, it may not be "permanent".

The workaround is simple, if tedious. Select the Customize tool on the Command Line (wrench icon) and then choose Input Search Options from the context menu that displays.
In the Input Search Options dialog, in the AutoComplete area in the upper left, verify that the According to frequency of usage radio button is selected, under Sort suggestions. If you choose Alphabetically, the list will always remain alphabetic; choosing According to frequency of use allows the commands you use most often to rise to the top of the list.
Also check the delay time at the bottom of the left side. The default value of 300 milliseconds was more than enough time for my single-character alias, you may want to increase this if you want to assure that the Command Line Suggestion List does not pop up if you have a longer alias, as there will not be any commands on the list with AutoComplete disabled. Finally, clear the checkmark next to Enable AutoComplete, to temporarily disable this feature. This will allow the command alias to be used without any interference from the AutoComplete feature. Select OK to accept the settings and dismiss the Input Search Options dialog.

Now for the tedious part: run the command you want at the top of the list repeatedly. I did not count how many times I needed to run the FILLET command to get it to the top of the list, but it was quite a few. In my case, it was probably made worse because I ran the FASTSEL command quite a few times while I was investigating this phenomenon. Once you get tired of running the command, open the Input Search Options dialog again and enable AutoComplete. Then type your alias and wait for the AutoComplete/Command Line Suggestion List to display, and see if your command is at the top. If it is, you should be able to use the command alias and get the desired command every time. If not, disable AutoComplete again and run the command repeatedly again.

Once your command is at the top, and if you increased the delay time, you may want to set it back to 300. You can do that in the Input Search Options dialog, or by changing the INPUTSEARCHDELAY system variable (which can be accessed by selecting the Customize tool on the Command Line, and then choosing Input Settings > Delay Time).

If you would rather just not deal with AutoComplete, you can disable this feature entirely by deselecting all of the options in the Input Search Options dialog (AutoComplete, AutoCorrect, Search system variables and Search content at command line).

August 15, 2013

Revit: Type Catalogs

A few months back I had my first experience with creating an Autodesk® Revit® family driven by a type catalog. I am finally getting around to documenting some of what I learned, so I do not have to learn it again, next time. For the record, the observations below were made while using Revit Architecture 2012; I have not yet worked with type catalogs in the 2014 release.

Yes/No Parameters
The column header format for Yes/No Parameters is: [ParameterName]##other##
where [ParameterName] is the name of the Yes/No parameter. The values assigned to this parameter for each type need to be either 0, for No, or 1, for Yes.

Text Parameters
If your type catalog includes a text-type parameter, such as the out-of-the-box Type Comments parameter, you have to add a value to that parameter in the family file. If the parameter is left unedited, when you try to load the family, you will get a Warning...
...and none of the values in your type catalog will be imported into the type(s) you chose to load into your project. If you edit the text parameter in the family, even by simply typing a single character and then deleting it, Revit recognizes that the parameter has been edited and will load the type catalog values as expected. In order to avoid confusing myself, I plan to leave some visible text in the family for each text parameter I have in the type catalog, so that I can see that the parameter has been edited. If a type needs a text parameter to be empty or blank, a blank value in the type catalog will overwrite the value in the family file, leaving the value of that parameter blank for that type.

Editing the Type Catalog
  • Once you load from a type catalog into Revit, it puts a lock on the text file that holds the type catalog data. I had to close Revit completely (not just the model into which I loaded the types from the type catalog) to get the lock to be released so that I could rename the file. I did discover that you can open, edit and save the type catalog text file, even with the lock on it, but I wanted to replace the file with a new one generated as a CSV file from the Excel file where I was doing the editing. While I could not rename the type catalog file and then rename the new CSV to replace it without closing Revit (which does not make for a very efficient testing period), I found that I could copy a new version of the type catalog file from another folder and overwrite the old version that Revit had locked, so I amended my workflow to moving the CSV file to another folder, renaming it by changing the extension to "txt" and then moving that file to the old version's folder, overwriting it.
  • If Excel (or another spreadsheet program) is used to generate the type catalog text file (by saving as a comma-separated values [CSV] file, and then changing the file extension to "txt"), you can use formulas in the Excel file to generate the values that end up in the type catalog. A formula in the Excel file can be applied on a per-type basis, whereas a formula added to a parameter in a family in Revit applies to all types in the family. As an example, the family I was generating represented the elevation of a Door. Some of the types had had glazing, and I needed to specify how far from each edge of the door the glazing started. Some glass was "full-width," with equal stiles and other glass was a lesser, given width. I was able to use a formula to calculate the glass width opening for the full-width types by subtracting twice the stile width from the overall width, while simply directly entering the value of the given-width glazing in the other types. I am sure there is a way to use multiple formulas and a Yes/No parameter to achieve that directly in a family, but since I was creating a type catalog anyway, it was nice to be able to have the flexibility to customize the formula on a per-type basis in Excel.

July 22, 2013

Software Rental and Remote Access

Here are a couple of new things that I became aware of today. I thought I would post links here in case others have not heard of these yet.

FAQ for Autodesk® Software Rental

You have to be on subscription to take advantage of the following Autodesk® Exchange application:
Autodesk® Remote

July 16, 2013

ActiveX and AutoLISP Programming Tip 1

When trying to make use of the AutoCAD® ActiveX® access to the object model through the AutoLISP® "VL" commands, the vlax-dump-object function will likely become one of your best friends. The Help sections on the object model are certainly useful, but as you test bits of code to verify that they work, I have found the vlax-dump-object function invaluable in helping me to understand exactly what properties are available for a given object.

For example, I was trying to update a subroutine I had written some years back that returned certain information about the current AutoCAD® Architecture drawing, including the drawing scale. This was before drawing scale had been added as a feature to the "vanilla" AutoCAD® software, and I had been using a DXF "hack" to get the current drawing scale from (namedobjdict) > AEC_VARS dictionary > AEC_VARS_DWG_SETUP dictionary > 40 group. In more recent releases, the CANNOSCALEVALUE system variable will give you the current annotation scale in a drawing. When Model Space is active in a Layout Viewport, however, it is possible for the viewport scale (magnification relative to Paper Space, which is presumed to be 1:1 when plotted) to be different from the annotation scale, and I wanted to be able to report both scales. By using the vlax-dump-object function in the Visual LISP Console for the ActivePViewport object, I was able to quickly see which properties changed when I changed settings in the drawing, which helped me to understand that the inverse of the CustomScale property of the ActivePViewport object would give me the scale factor for the viewport magnification, and also allow me to sidestep dealing with the enum values reported by the StandardScale (Viewport magnification) and StandardScale2 (viewport annotation scale).

Another thing that I was able to discover by using the vlax-dump-object function was that the Paper Space Viewport does not report all of the properties that other Layout Viewports report. For example, a Layout Viewport object scaled to 1/4" = 1'-0", saved to variable objVpA, might have the following properties, which can be examined using vlax-dump-object:
_$ (vlax-dump-object objVpA)
; IAcadPViewport: IAcadPViewport Interface
; Property values:
;   Application (RO) = #
;   ArcSmoothness = 10000
;   Center = (17.8157 11.25 0.0)
;   Clipped (RO) = 0
;   CustomScale = 0.0208333
;   Direction = (0.0 0.0 6889.41)
;   DisplayLocked = 0
;   Document (RO) = #
;   GridOn = -1
;   Handle (RO) = "E84"
;   HasExtensionDictionary (RO) = -1
;   HasSheetView (RO) = 0
;   Height = 22.5
;   Hyperlinks (RO) = #
;   LabelBlockId = 0
;   LabelBlockId32 = 0
;   Layer = "G-Anno-Nplt-N"
;   LayerPropertyOverrides (RO) = 0
;   LensLength = 50.0
;   Linetype = "ByLayer"
;   LinetypeScale = 1.0
;   Lineweight = -1
;   Material = "ByLayer"
;   ModelView = nil
;   ObjectID (RO) = 60
;   ObjectID32 (RO) = 60
;   ObjectName (RO) = "AcDbViewport"
;   OwnerID (RO) = 61
;   OwnerID32 (RO) = 61
;   PlotStyleName = "ByLayer"
;   ShadePlot = 0
;   SheetView = nil
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   StandardScale = 26
;   StandardScale2 = 7
;   Target = (1690.27 1160.54 0.0)
;   TrueColor = #
;   TwistAngle = 0.0
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UCSPerViewport = -1
;   ViewportOn = -1
;   Visible = -1
;   VisualStyle = 1
;   Width = 35.3685


For the Paper Space Viewport object for that same Layout, vlax-dump-object returns the following:
_$ (vlax-dump-object objVpA)
; IAcadPViewport: IAcadPViewport Interface
; Property values:
;   Application (RO) = #
;   ArcSmoothness = 10000
;   Center = (24.3525 19.3312 0.0)
;   Clipped (RO) = 0
;   CustomScale = 1.0
;   Direction = (0.0 0.0 1.0)
;   DisplayLocked = 0
;   Document (RO) = #
;   GridOn = 0
;   Handle (RO) = "1FB"
;   HasExtensionDictionary (RO) = 0
;   HasSheetView (RO) = 0
;   Height = 36.5272
;   Hyperlinks (RO) = #
;   LabelBlockId = Exception occurred
;   LabelBlockId32 = ; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)
; error: Exception occurred: 0xC0000005 (Access Violation)


The LabelBlockID property is apparently unavailable for a Paper Space Viewport and the LabelBlockId32 property is not only unavailable, but trying to get the value causes an error that terminates the vlax-dump-object function. You can get to the properties that occur alphabetically after those two, one at a time, by using the vlax-get-property function. My routine presumes that Paper Space is plotted at 1:1 and any annotation would be scaled accordingly, so it sets the scale factors for both the viewport and the annotation at 1.0 without extracting any data from the drawing.

July 04, 2013

ActiveX Access to ACA/AMEP Drawing Settings

Updated 10/26/2019 to add support for versions 2015 through 2020 to the AECAPPVER code.

Since the 2010 releases, the AEC data stored in "dictionaries" has not been accessible through AutoLISP® entities/entity data, as it had been previously, through statements such as:
(cdr (assoc 350 (member '(3 . "AEC_VARS") (entget (namedobjdict)))))

I recently had the time and opportunity to investigate the use of the Visual LISP® functions to access the drawing data to access the data previously available through entity data.

The keys to getting ACA or AMEP data are understanding the Object Model, so that you know which Application holds the data of interest, a willingness to explore the Object Model, so you can find things that are exposed in locations other than what the object model suggests, and knowing that the "undocumented" vla-GetInterfaceObject function can be used to access those Applications and thereby the Object Model elements defined/stored therein.

The Help menu (in recent releases, in the upper right corner of the ACA/AMEP window, to the right of the InfoCenter and to the left of the Minimize/Maximize/Close buttons) has a choice called AutoCAD® Architecture Developer Help (in ACA) or AutoCAD® MEP Developer Help (in AMEP) that will open "local" Help files that explain the Object Models and available objects, methods and properties. AMEP users will need to see the ACA file, which can also be found under the installation directory (C:\Program Files\Autodesk\AutoCAD 2014\Help\adtauto.chm for my installation of the 2014 Building Design Suite). The AMEP file can also be found in the same folder (absauto.chm).

The loading of the Application objects is version-dependent, so the first step on my journey was to write a subroutine to return the proper string indicating the version of the release of ACA/AMEP running. Because many of the routines I am trying to update were written in the ADT 3.3/2004 time frame, I have chosen to include releases back to that time in this function. Unfortunately, I no longer have access to many of those releases to verify the AEC version numbers, so some of the return values in the routine are based on my best guess. If anyone is still running any of the the releases marked "verify", please do verify the values before trying to use the following code. And if you do, and are so inclined, I would appreciate a comment to this post either verifying that I guessed correctly or providing the right values. The subroutine initially tests to see if ACA or AMEP is running, and returns nil if aecarchbase.dbx or aecarchbasenn.dbx is not loaded, where nn is a two-digit number indicating a specific release from 2007 or earlier. If it is not loaded, then the subroutine ends with a warning to the user and returns nil, since there is little point looking for information that does not exist. The calling routine will have to determine how to handle the return of a nil value.
(defun AECAPPVER (            ; No arguments.
                   / ;_ Local variable:  
                     sacdvr   ; String stored in ACADVER system variable.
                 ) ;_ End arguments and local variables.
  (setq sacdvr (getvar "ACADVER"))
  ;; Return appropriate string:
  (cond                       ; cond A.
    ((not
       (or
         (member "aecarchbase.dbx" (arx))
         (member "aecarchbase50.dbx" (arx))
                              ; DBX file name not verified for 2007.
         (member "aecarchbase47.dbx" (arx))
         (member "aecarchbase45.dbx" (arx))
                              ; DBX file name not verified for 2005.
         (member "aecarchbase40.dbx" (arx))
                              ; DBX file name not verified for 2004.
         (member "aecarchbase30.dbx" (arx))
                              ; DBX file name not verified for 3.3.
       ) ;_ End or.
     ) ;_ End not.
      ;; ACA or AMEP is not running.
      (alert
        (strcat
          "Unsupported version of AutoCAD Architecture/MEP is running."
          "\nACADVER = "
          sacdvr
          "."
          "\n\nPlease notify the CAD/BIM IT Staff."
         ) ;_ End strcat.
      ) ;_ End alert.
      nil                     ; Return nil.
    ) ;_ End condition A.1.
    ((= "15.06" sacdvr)       ; ADT 3.3.
      ".3.0"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.2.
    ((= "16.0" sacdvr)        ; ADT 2004.
      ".4.0"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.3.
    ((= 16.1 (atof sacdvr))   ; ADT 2005.
      ".4.5"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.4.
    ((= 16.2 (atof sacdvr))   ; ADT 2006.
      ".4.7"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.5.
    ((= 17.0 (atof sacdvr))   ; ADT 2007.
      ".5.0"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.6.
    ((= 17.1 (atof sacdvr))   ; ADT 2008.
      ".5.5"                  ; Return string.
    ) ;_ End condition A.7.
    ((= 17.2 (atof sacdvr))   ; ADT 2009.
      ".5.7"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.8.
    ((= 18.0 (atof sacdvr))   ; ADT 2010.
      ".6.0"                  ; Return string.
    ) ;_ End condition A.9.
    ((= 18.1 (atof sacdvr))   ; ADT 2011.
      ".6.5"                  ; Return string.
    ) ;_ End condition A.10.
    ((= 18.2 (atof sacdvr))   ; ADT 2012.
      ".6.7"                  ; VERIFY THIS RETURN STRING!
    ) ;_ End condition A.11.
    ((= 19.0 (atof sacdvr))   ; ADT 2013.
      ".7.0"                  ; Return string.
    ) ;_ End condition A.12.
    ((= 19.1 (atof sacdvr))   ; ADT 2014.
      ".7.5"                  ; Return string.
    ) ;_ End condition A.13.
    ((= 20.0 (atof sacdvr))   ; ACA 2015.
      ".7.7"                  ; Return string.
    ) ;_ End condition A.14.
    ((= 20.1 (atof sacdvr))   ; ACA 2016.
      ".7.8"                  ; Return string.
    ) ;_ End condition A.14.
    ((= 21.0 (atof sacdvr))   ; ACA 2017.
      ".7.9"                  ; Return string.
    ) ;_ End condition A.15.
    ((= 22.0 (atof sacdvr))   ; ACA 2018.
      ".8.0"                  ; Return string.
    ) ;_ End condition A.15.
    ((= 23.0 (atof sacdvr))   ; ACA 2019.
      ".8.1"                  ; Return string.
    ) ;_ End condition A.16.
    ((= 23.1 (atof sacdvr))   ; ACA 2020.
      ".8.2"                  ; Return string.
    ) ;_ End condition A.17.
    (T                        ; Unsupported version running.
      (alert
       (strcat
         "Unsupported version of AutoCAD is running."
         "\nACADVER = " sacdvr "."
         "\n\nPlease notify the CAD/BIM IT Staff."
       ) ;_ End strcat.
     ) ;_ End alert.
     nil                       ; Return nil.
    ) ;_ End condition A.18.
  ) ;_ End cond A.
) ;_ End AECAPPVER.


With the subroutine above loaded, you can access the AecArchBaseApplication with this code
(vla-GetInterfaceObject 
  (vlax-get-acad-object) 
  (strcat "AecX.AecArchBaseApplication" (aecappver))
)

I will post more of my findings as I develop them.

Backstory Behind This Post:
Many years back, I did a lot of customization in AutoCAD® using AutoLISP, and was particularly pleased when the Visual LISP was introduced, as I made extensive use of the Visual LISP interactive development environment (VLIDE). While perhaps somewhat less slick that the equivalent setup for Visual Basic, it none the less made writing, testing and debugging a LISP routine or project much easier than using Notepad or a DOS text editor. I never really worked with the Visual LISP commands that were added to the AutoLISP arsenal at that time, however, and the time I had for customization dwindled with increasing project responsibilities and with attempting to master Architectural Desktop/AutoCAD Architecture.

I did, however, manage to find time to write a few customizations that accessed ACA settings (such as the drawing scale - before AutoCAD added that feature, Annotation Plot Size, current Layer Key Style, etc.) via DXF access to the dictionaries where that data was stored. There was little to no documentation on the structure of those dictionaries, but by working with what there was and trial and error, I was able to find the locations of various settings. My routines only read these values, and then acted accordingly; changing the values through ENTMOD was not supported and actively discouraged by Autodesk staffers. These routines stopped working in the 2010 release, because the dictionary contents were no longer exposed to DXF "hacking".

My on-the-job responsibilities shifted last year, as I moved out of the Project Architect roll and into the CAD/BIM Manager roll. I had reason to get back into customization, as I was looking for a way to expedite the processing of AutoCAD files exported from Revit, which tend to have a lot of entity-level settings (in particular, color) and which then tend not to work well for the disciplines that remain in CAD, as they are used to externally referencing the background drawings and controlling the appearance and plotting of the elements therein via layer settings. While working on that task, I had reason to become more familiar with the capabilities in the Visual LISP commands, and was reminded that I had a number of routines that no longer worked in versions more recent than 2009. I am using the rehabilitation of these routines as a pretext to become more familiar with the Visual LISP commands and the ACA Object Model, as I suspect that these skills will continue to have some relevance, at least until the day that our work is all Revit and no AutoCAD.

June 04, 2013

ACA 2013 Service Pack 2

Autodesk® has released Service Pack 2 for AutoCAD® Architecture 2013. As always, be certain to read the entire README before installing Service Pack 2. In the list below, "SP1" indicates an item fixed in Service Pack 1 (and included in Service Pack 2) and "SP2" indicates an item fixed in Service Pack 2.

The following ACA defects have been addressed:

AEC Dimensions
  • SP1: Crash when saving a drawing originally in 2004 (or earlier) format, with AEC Dimensions on a locked layer. *
  • SP1: Some AEC dimensions created before version 2007 do not display correctly in later versions.
Annotation Scaling
  • SP1: Some tags are very small when added to drawings that use meters.
Autodesk 360
  • SP1: Synchronizing tool palettes to Autodesk 360 is very slow. This capability has been disabled with this Service Pack.
  • SP1: Online Render does not support AutoCAD Architecture objects.
Custom Blocks
  • SP2: Some doors or windows with custom blocks do not display their frame values correctly.
Doors
  • SP1: Some double door styles with custom profiles do not display correctly.
Drawing Compare
  • SP2: Occasional crash related to drawing compare. *
Drawing Management
  • SP1: Intermittent crash when creating a Construct in Project Navigator, or when opening AutoCAD Architecture with a certain project current. *
Elevation Labels
  • SP1: When an external reference is bound into the drawing, its elevation labels will be reset to zero.
  • SP2: Elevation labels defined in world UCS display zero after applying Service Pack 1.
  • SP2: Elevation labels defined in world UCS display zero after applying Service Pack 1.
Export to AutoCAD
  • SP2: If a drawing has an Xref Xclipped using the Invert Clip option, the opposite part is actually Xclipped after Export to AutoCAD.
Geometry Sharing
  • SP2: Occasional crash related to geometry sharing. *
  • SP2: Objects may not show correctly during 3D orbit.
Grips
  • SP1: Occasional crash when editing grips for of structural members. *
IFC
  • SP1: Several improvements have been made to meet the requirements of IFC coordination view 2.0 and GSA certification.
Layer Key
  • SP1: Fatal error when layer key overrides from tool palettes and layer key overrides of current layer standard do not match. *
List Definition
  • SP2: In certain cases, List Definitions cannot be modified.
Migration
  • SP1: Content browser migration may fail when migrations are done multiple times.
Object Viewer
  • SP2: Crash when saving an image in the object viewer while the steering wheel is enabled. *
Open
  • SP1: Frequent crash when opening some drawings. *
Progressive update
  • SP1: Characters in certain fonts do not display correctly when the AutoCAD system variable setEnableProgressiveUpdate is yes.
Project Navigator
  • SP2: Occasional crash related to the Project Navigator. *
  • SP2: Occasional crash when double-clicking drawing nodes in the Project Navigator. *
  • SP2: Failure to create projects on WebDav servers.
Roombook
  • SP1: In a Roombook schedule exported to Excel, the result is off by a factor of 1000 if the decimal symbol in Windows is set to comma.
Schedules
  • SP1: Crash when exporting to Excel 2003 a Schedule table which includes a complex formula. *
  • SP1: Schedules created by Roombook move slowly.
  • SP1: The total sum values may be incorrect in schedule tables when grouping is first turned on.
  • SP1: The width of the schedule frame may be incorrect when grouping several columns.
  • SP2: Some schedule table lines fail to be turned off through display system.
Sections
  • SP1: Occasional crash when modifying an object that is included in a section. *
  • SP1: Crash while generating sections for big drawings or when using CreateHLR. *
  • SP1: New or refreshed sections are not correct in AutoCAD Architecture 2013 as many lines are not hidden.
Slabs
  • SP2: Occasional crash related to slab and roof slab. *
Spaces
  • SP2: Area calculation may be incorrect for some irregular trapezoid spaces.
Sync
  • SP1: Due to the large number of files in the Tool Palette, syncing AutoCAD Architecture settings to the cloud is very slow. Note: Once you apply Service Pack 1, you can no longer sync the AutoCAD Architecture Tool Palette to the cloud.
Walls
  • SP1: Occasional crash related to certain wall cleanup conditions. *
Windows 8
  • SP1: Frequent crash when closing AutoCAD Architecture. *
  • SP2: Occasional crash when adding tags to objects. *
  • SP2: Crash when modifying space geometry type. *
  • SP2: Enhanced column grid labels cannot be modified under some circumstances.

The following AutoCAD defects have been addressed:

3D Navigation Tools
  • SP1: Unexpected exit while panning. *
  • SP1: Occasional crash related to navigating in 3D drawing. *
  • SP1: The Keep Scene Upright option in the 3DConnexion Settings dialog box cannot not be changed.
  • SP2: Occasional crash related to navigation tools. *
  • SP2: Zoom speed varies with 3Dconnexion device in perspective view.
3D Modeling
  • SP1: Occasional crash while selecting a face during a Presspull operation. *
  • SP1: Crash when opening multiple 3D drawings containing a large number of 3D objects. *
  • SP1: Issue with the centroid computation for 3D solids.
  • SP2: Issue with the MASSPROP command with sliced 3D solids.
Action Recorder
  • SP1: Action macros recorded in previous releases are not working correctly in AutoCAD 2013.
Autodesk 360
  • SP1: Crash in Japanese AutoCAD when logging into Autodesk 360 from the Options dialog box. *
  • SP1: Occasional crash when opening a drawing that contains xrefs, when logged in to Autodesk 360. *
  • SP1: Pressing F1 does not display Help for the ONLINESYNCSETTINGS dialog box.
  • SP1: Drawing files with names containing language-specific characters do not get saved to Autodesk 360.
  • SP1: User is not automatically logged in when launching Autodesk 360 from the AutoCAD ribbon.
  • SP1: Sometimes the Share Drawing dialog box opens behind the main application window.
  • SP2: Crash with long file path in the Autodesk 360 folder. *
  • SP2: Occasional crash when opening AutoCAD with the InfoCenter off. *
Block
  • SP2: Occasional crash when clicking a block table grip with only one row of values available. *
  • SP2: Issue with the display of the Block Property Table cascading menu.
Command Line
  • SP2: Crash when switching Input Method Editor (IME) after canceling a command when DYNMODE is set to 0 and the command window is docked. *
CUI (Customize User Interface)
  • SP1: Occasional crash while loading a custom CUI file. *
  • SP1: Unhandled exception occurs while clicking the Customize button from Quick Properties palette on a computer running .NET 4.5. *
  • SP2: Missing checkboxes in the Customize User Interface (CUI) dialog box when NET 4.5 is installed.
Customization Sync
  • SP1: Customization Sync progress animation runs continuously.
  • SP1: Customization Sync does not sync new custom commands in tool palettes.
DesignCenter
  • SP1: Occasional crash while working with DesignCenter. *
DGN Support
  • SP1: Fatal error when attaching or importing certain DGN files. *
  • SP1: Export to DGN does not use the Global Origin specified in the seed file.
  • SP1: The DGNIMPORTUNITCONVERSION system variable is missing in AutoCAD LT.
  • SP2: Fatal error when scrolling the DGN linetype in the Properties Palette. *
  • SP2: Issues with exporting files to DGN, even after exploding contents of file.
  • SP2: Import of a DGN arc as an Ellipse.
Dimensions
  • SP1: Crash after undoing the creation of a non-associative continued or non-associative baseline dimension. *
  • SP1: Existing drawings lose Qleader settings when edited in AutoCAD 2013.
  • SP1: Dimensions created using the Perpendicular object snap will shift when the drawing geometry is moved, copied, or otherwise modified.
  • SP2: Occasional crash when grip-editing annotative dimensions. *
  • SP2: Radial dimensions for regions can become associated to wrong arc.
  • SP2: Dimension text background fill cannot be reset in Properties.
  • SP2: Jogged radial dimensions in paper space may reflect the wrong value of an extruded cylinder in model space.
Display Drivers
  • SP1: Integrated chipsets are unable to return available video memory correctly.
  • SP1: When using COPYCLIP and PASTECLIP on a 64-bit operating system, you might see the object color change from the original color.
Express Tools
  • SP1: Occasional crash during a MOCORO (Move/Copy/Rotate) command. *
External Reference (XREF)
  • SP1: External reference drawings (XREFs) show as unresolved in AutoCAD 2013.
  • SP2: An OLE Object in an xref was not correctly set before the xref was detached. This crash issue has been resolved by opening the xref before erasing it. *
Field
  • SP1: An object's angular property uses linear format instead of angular format in the Field dialog box.
Hatch
  • SP1: Occasional crash while zooming during Hatchedit. *
  • SP1: The Hatch Preview option is not available from the context menu when creating a hatch.
Image
  • SP2: A MONOCHROME BITMAP attached in DWG file is not shown correctly.
InfoCenter
  • SP1: Crash when clicking any option from the Stay Connected button in the title bar when no drawings are open. *
INQUIRY
  • SP1: Crash while calculating area of a polyline that contains at least one segment that has been reduced to zero length. *
  • SP2: MASSPROP reports an incorrect mass and centroid for a solid swept along a planar spline.
MLeader
  • SP1: Multileaders incorrectly display a dot at the content block's insertion point.
  • SP1: If the Extend Leaders to Text option is turned on, the text in multileaders moves if the drawing is opened or edited in AutoCAD 2013.
  • SP2: Occasional crash when using MATCHPROP with multileaders. *
  • SP2: Multileader scale is not always updated when multileader style is changed.
Model Documentation - Detail View
  • SP2: Changing the Hatch property of a Detail view derived from a Section view sometimes causes AutoCAD to hang.
Modify
  • SP1: The SCALE command gets cancelled while dragging when small scale factor is acquired with object snap turned on.
  • SP2: Ellipse is sometimes distorted during stretching.
MTEXT
  • SP2: The font doesn't match the setting in -STYLE command in Windows 8.
OLE
  • SP2: Occasional crash when closing the application with a drawing that contains an OLE object. *
OPTIONS
  • SP2: Occasional crash when changing or switching profiles in Options. *
PDF Export
  • SP1: Plotting to a PDF file with a plot style causes wipeouts to appear black.
PDF Underlay
  • SP2: Crash when specifying other PDF file from Saved Path field in External Reference palette. *
Performance
  • SP1: Slow performance while running a large script.
  • SP1: Slow performance while creating Layers quickly.
Plot
  • SP1: Occasional crash while plotting to PDF. *
  • SP1: Crash while plotting to a PDF file and the PDF driver is not present. *
  • SP1: Using Plot Preview turns the Command window back on.
  • SP2: Occasional crash when plotting with a wipeout in the drawing. *
  • SP2: .
Point Cloud
  • SP1: Crash if the PCG file used to create a point cloud object does not exist. *
Properties Palette
  • SP1: When an object is selected, the tooltip is missing in the Properties Palette for the following languages: Traditional Chinese, Czech, Russian, and Hungarian.
Ribbon
  • SP1: The Visibility drop-down control on the Block Editor Ribbon is not working properly when property preview is enabled.
Selection
  • SP1: Pressing Shift with a window selection fails to remove multiple Drawing Views from the selection set on a layout.
  • SP2: Grips for attributes of blocks are not automatically made hot upon sub-selection.
  • SP2: Selection preview is reset to off when IntelliMouse® zooming is ended.
Sheet Set Manager
  • SP1: A high network utilization will result with the SMB V2 (Server Message Block) protocol while working with the Sheet Set Manager.
Startup
  • SP1: Crash due to corrupt graphics cache files on startup. *
  • SP1: Crash occurs while canceling a LISP routine that runs at program startup. *
Visual Lisp
  • SP1: Menucmd does not display the drop-down menu when the Command window is docked.
  • SP2: DCL files whose code page matches the system but not the product are not recognized and loaded properly.
General
  • SP1: Crash on undo/redo after adding 256 or more objects to a group. *
  • SP1: Crash on viewing thumbnail in AutoCAD 2012 when installed side-by-side with AutoCAD 2013. *
  • SP1: Occasional crash when exploding splines created by third-party applications. *
  • SP1: Crash when AutoCAD exits on computers running .NET 4.5. *
  • SP1: Error on launching AutoCAD after the QuickCalc palette is anchored.
  • SP1: INSBASE value is incorrect for a drawing created using -WBLOCK.
  • SP2: Occasional crash when opening AutoCAD drawings in Windows 8. *
  • SP2: Occasional crash due to using Intersection object snaps on lightweight polylines. *
  • SP2: Some corrupt drawings crash when opened or saved and are not fixed automatically. *
  • SP2: Exiting the Text Editor while previewing text style causes a crash. *
  • SP2: Saving some DWG files that contain 3D solids is slow.
  • SP2: A UCS other than the World UCS results in an incorrect location for the wipeout frame.
  • SP2: Prompts to save are not displayed when closing a hyperlink drawing that has been changed.
  • SP2: Performance is slow when saving the drawing created with Release 2010 and earlier.
* - Indicates item was reported through the Customer Error Reporting Utility.

In Service Pack 1, an ability to disable the autoloading of AutoLISP or VBA on startup and to disable AutoLISP entirely was added, to aid in dealing with malicious AutoLISP or VBA code. This remains in Service Pack 2. See the README for more details.