September 11, 2019

ACA: Rotation Property for Multi-View Blocks

Robin Capper made the observation in a post to the AutoCAD Architecture Forum that Multi-View Block References do not have an automatic property for Rotation, unlike Block References or MInsert Blocks. I was surprised to see that was true, but figured that a Formula Property would be able to get the value, if it is exposed.

A quick check using the "vlax" functions in AutoLISP verified that the Rotation property is exposed in the API. I have gotten a little rusty on the specifics of accessing data from the drawing in a Formula Property, but after a few searches of this blog, I had enough to refresh my memory and come up with this as the formula for a Formula Property in a Property Set Definition that applies to Multi-View Block References:
pi = 3.141592653589793238462643383
Set acadApp = GetObject(,"AutoCAD.Application")
Set mvbObj   = acadApp.ActiveDocument.ObjectIDToObject( [ObjectID] )
RESULT = CDbl(mvbObj.Rotation * 180.0 / pi)

Before you create the Formula Property, add an instance of the ObjectID automatic property to the same Property Set Definition. In the formula, [ObjectID] needs to be a reference to that property, created by double clicking on the property in the Insert Property Definitions area of the Formula Property Definition dialog. You cannot just type [ObjectID] in the formula. When the reference is added, it will have a light gray background.

The angle value obtained from the Multi-View Block Reference object is in radians; I chose to convert that value to degrees. If radians will suit your needs better, you can delete the first line and, in the RESULT line, delete * 180.0 / pi. After posting my reply, I came across a better way to generate the value for pi:
pi = 4 * Atn( 1.0 )

August 29, 2019

Revit: Yes/No Parameter Values

You might think that a Yes/No parameter can only have two values:
  • Yes
  • No
But, in fact, there can be three values:
  • Null
  • Yes
  • No
Null will only occur when a Yes/No parameter is first placed on an object, such as when you add an instance-based Yes/No Project Parameter to one or more categories in your project (for this example, Walls). After doing so, you will see something similar to this:
In the image above, the HasToggle Yes/No parameter has just been added to Walls. The toggle itself (the square in the value column) shows a check mark, but the check mark and the square are grayed out. You might think this means that the parameter is disabled, but if you look at the parameter name, it is not grayed out. Contrast this to the Enable Analytical Model parameter a few rows below the HasToggle parameter, where both the parameter name and the square are grayed out. The Enable Analytical Model parameter is disabled, because the Structural parameter (another Yes/No parameter) is not checked. The HasToggle parameter is enabled, but the toggle is grayed out to indicate that a value for the parameter has not yet been chosen, so the value is at its initial "Null" state.

Left clicking on the toggle will set the value to Yes, and the toggle is no longer grayed out.

Left clicking on the toggle again will change the value to No.

Once the toggle is clicked and an initial value set, you cannot set it back to Null, so, in operation, there are only two values, Yes and No, but you need to be aware that parameter can have that third value, Null, as that can have an impact on your model. For example, suppose the HasToggle parameter is used to drive two filters, that will be used to change the display of Walls in a view.
In the image above, you can see that two filters have been created, HasToggle-Yes and HasToggle-No, along with the properties of the HasToggle-Yes filter. The filter applies to Walls, and will select all Walls where the HasToggle parameter is set to Yes. The HasToggle-No filter properties are identical, except the filter collects Walls whose HasToggle parameter value is set to No. In the LEVEL 1 FLOOR PLAN View, these filters have been applied and an unattractive combination of colors has been assigned to the Cut Lines and Patterns, to make it obvious that the filter has been applied.

In the image below, you can see eight Walls in the LEVEL 1 FLOOR PLAN View. Two have had the HasToggle parameter set to Yes (checked), two have had the HasToggle set to No (unchecked) and the other four remain in the initial Null state. The Null Walls are not affected by either filter, because the value of the HasToggle parameter is neither Yes nor No.

August 27, 2019

AEC Answer Day - September 24, 2019


Another installment of Autodesk Answer Day, focused on AEC-related products, will take place in the the following forums:
  • English-language Users, 6:00 am (September 24) to 2:00 am (September 25) Pacific Standard Time
    • AutoCAD
    • Civil 3D
    • Revit
    • BIM 360
  • German-language Users, 9:00 am to 5:00 pm Central Europe Time (September 24)
    • AutoCAD Produktfamile - Deutsch
    • Revit - Deutsch
    • Inventor - Deutsch
    • Fusion 360 - Deutsch
    • EAGLE - Deutsch
    • PowerMill, PowerShape, PowerInspect & FeatureCAM - Deutsch
    • BIM 360 - Deutsch
    • 3DS Max - Deutsch
    • Maya - Deutsch forums.

More information, and links to the forums noted above, can be found in this Community Announcement. Stop in that day with your questions and interact with the Autodesk staff that will be taking part.

August 01, 2019

ACA: Got Blips?

Many younger users may have never seen "BLIPS" and many older users have probably forgotten about them. The BLIPMODE command and System Variable have been undefined in AutoCAD® and its verticals since the 2012 release. Back in the day, if BLIPMODE was turned on, every pick would be memorialized on screen with a small, white "+" mark. ZOOMing, PANning or using the REDRAW (yes, that command did have a function once) or REGEN commands would clear these temporary markers from the screen. But if you worked for a while without needing to change your view, you could accumulate a lot of these (and would probably quickly turn BLIPMODE off).

Undefined is not the same as removed, however, and the command is still there, and the System Variable can be accessed via AutoLISP. The System Variable was (is) stored in the Windows Registry, not in the drawing file, so someone could change the setting in the registry, as well. If you find yourself working in a drawing and having blips show up with each left mouse click, even if you remember "BLIPMODE," you will find that neither the command nor the System Variable is "known" by recent versions.

What to do? At the command line, type in the command with a period at the front: .BLIPMODE. The period tells AutoCAD to use the original definition of the command, and suddenly AutoCAD recoginzes it.

Press the ENTER key, and then choose OFF from the command line options.

Or, if there is someone in your office who is overdue for a (mostly) harmless prank, wait for her/him to leave her/his workstation with AutoCAD open. Start a new drawing, type .BLIPMODE, press ENTER and choose ON. Close the new drawing without saving. Discretely slip away, and await your colleague's return, and eventual annoyance. You may want to pop in and offer to fix the issue, before things escalate to an HR-level event. [Use at your own risk.]

July 13, 2019

AUGI Salary Survey, 2019

Help make the survey results more accurate by taking the survey and adding your information: 2019 AUGI Salary Survey.

July 11, 2019

ACA: Schedule Tag Background Mask

I suppose I must have known about this at some time in the past, but having never made use of it, it slipped my mind. The other day, I needed to make some Schedule Tags to replace some attributed Block References. The Attribute Definitions in the Block References had background masking turned on, so that they could be placed on top of other linework and the mask would assure that the contents of the attribute remained readable.

I made use of the graphics from the Block Reference and ran it through the DefineTag command to create the Schedule Tag Multi-View Block reference. I was hoping that the background mask on the Attribute Definition would be respected in the Schedule Tag, but it was not. An internet search turned up this Autodesk Knowledge Network Article, allowing me to re-learn what I had probably forgotten. You create an AEC Polygon Style to use for the background mask; on the Other tab, check the Use Background Mask toggle.

If you do not want the border of the AEC Polygon to plot, go to the Display Properties tab and create a Style Override for the Model Display Representation. In the override, turn off the visibility of the Exterior Edge component. (Do the same for the Model Screened Display Representation if you use that in views that include the Schedule Tags.)

Place an AEC Polygon instance using the Style you just created as part of the graphics you select for the DefineTag command. Be sure to select the AEC Polygon first, and then the other graphics, so that the other graphics are not masked by the AEC Polygon.

In the image below, the Door Tags have had a masking AEC Polygon placed behind the other graphics, and that AEC Polygon is masking out the color fill of the Space and the swing of the Door that is behind the Tag.

July 03, 2019

ACA: Open Dialog Does Not Show - But FILEDIA Is Set to 1

I had a report that the AutoCAD® Architecture Open dialog was not showing up when the OPEN commmand was being used. First thing I checked was the value of the FILEDIA System Variable, but it was set to 1, and there were no prompts on the Command Line when running the OPEN command.

I found the solution for this case in an Autodesk Knowledge Network article, Dialog windows do not display and the program appears to freeze, which offers several suggestions for resolving the issue. Having already done the first one (FILEDIA), I tried the second one - holding SHIFT+WINDOWS KEY and then pressing the LEFT or RIGHT ARROW KEY. That keystroke combination moves the current window from one screen to the next, and it did bring the Open dialog back onto one of the two active monitors.

The user's computer is a laptop, which was docked and closed, but perhaps the dialog was hiding out on the laptop monitor? Wherever it was, the issue was resolved, and I was glad to not have to resort to the last suggestion, editing the Windows Registry.

June 26, 2019

Revit: Phasing Area Plans

We use Area Plans in Revit to assist in calculating the occupant load on our life safety drawings. A recent project was being done in phases, and separate life safety plans were required for each phase, showing the occupant load (and egress) at the end of each phase. Area Plan Views do have Phase and Phase Filter parameters (to show the modeled elements correctly for a given plan), but Area objects do not have Phase Created and Phase Demolished parameters, so their visibility cannot be controlled by the phase settings on an Area Plan View.

Phased Area Plans can be created - but you need to make a separate Area Scheme for each separate phase to be shown. Here is how to do that:
  1. On the Architecture ribbon tab, on the Room & Area panel, select the panel title to deploy the flyout and then select the Area and Volume Computations tool.
  2. In the Area and Volume Computations dialog, select the Area Schemes tab and then select the New button.
  3. Give the new Area Scheme a name and description, clearly identifying the phase to which it will apply in the name. Create additional Area Schemes, one for each phase needed.
  4. Select the OK button to create the new Area Schemes and dismiss the dialog.
  5. On the Architecture ribbon tab, on the Room & Area panel, select the Area tool. On the flyout, select the Area Plan tool.
  6. In the New Area Plan dialog, set the Type to one of the "phased" Area Schemes you just created, and then select the Level(s) for which you will need plans for that "phase".
  7. Repeat the creation of Area Plans for the other "phased" Area Schemes.
  8. In the Project Browser, select one of the Area Plan Views you just created and, in the Properties palette, set the appropriate values for the Phase and Phase Filter properties, so that the plan view of the model shows correctly for that phase. If you have (a) View Template(s) set up for these Area Plans, apply the appropriate template. (If the template controls the Phase Filter, you can skip setting that in the Properties palette.)
You now have Area Plans for each phase. Add the desired Areas to each. Each Area Scheme is independent of the others, so any Areas that are common to two or more Schemes will have to be created in each.

One other note, if you need to create Schedules for the Areas, be aware that you have to specify the Area Scheme to which the Schedule applies at the time of Schedule creation, and you cannot change that later. What that means is if you have multiple Area Schemes, and need the same Schedule for each Scheme, you will not be able to create one, duplicate it and then change the Scheme to which it applies. You will need to create a Schedule for each Area Scheme from scratch. (If you need multiple Schedules of the same type within one Area Scheme - for example, if you have separate Schedules for the occupant loading of each level - you can duplicate the first schedule created for that Area Scheme, and then change the filtering to show different items (such as from another level).

May 08, 2019

ACA: ExportToAutoCAD - Room Tag Attributes Not Shown

I came across something curious today. Someone wanted to link an AutoCAD® Architecture drawing in Revit, but the Room Tags were not showing. That is because Revit cannot read AEC Objects (not the curious thing). I suggested using one of the EXPORTTOAUTOCAD commands to create a copy of the file, with all of the AEC Objects exploded to AutoCAD linework. That was done, but in the resulting file, the blocks that were the result of exploding the Room Tags were not showing any of the attributes that should have been displaying the room name and number.

Here is the curious part: Grips for the "missing" attributes displayed, and, in the Properties palette, values for the room name and number attributes were shown.

I tried REGENerating the drawing, I checked layers 0 and Defpoints to verify they were on and thawed and even tried an OBJRELUPDATE (even though the object was now an AutoCAD block, and not an AutoCAD Architecture Multi-View Block). I inserted a new instance of the block, and values entered into the room name and room number attributes displayed as expected. Fortunately, lunch intervened, allowing my frustration to subside. With a semi-fresh brain, I returned to the issue after lunch, and it occurred to me to try running ATTSYNC on the block. And that turned out to be the solution, as the values displayed after doing so.

I was not able to reproduce this in a sample file, created with the same content, but at least I have a solution should I come across this again in the future.

April 11, 2019

Dynamo: Python Node to Test For Presence of a Parameter on an Object

We have a Dynamo graph that allows the user to search for a user-specified string in the names of Views and, if found, replace it with a second user-specified string. This comes in handy when someone decides that all of the instances of "LEVEL" in the view names should be changed to "FLOOR". The graph worked, but would result in an error condition, because there are, apparently, Views that do not have a "View Name" parameter attached to them. Attempting to retrieve the View Name parameter value from all elements of the Views category using an Element.GetParameterValueByName node resulted in this error:

While this did not appear to interrupt the processing of all Views, I would prefer to not have an error reporting (in both Dynamo and Dynamo Player), so that I do not have to explain to others who might use the graph that having that error is "Ok". I thought it would be simple to construct a BoolMask to filter out the Views without a View Name parameter, and proceeded to try to do so. Perhaps there is an easy way to create that BoolMask with core nodes or with something from a package, but my initial attempts were unsuccessful. The best I could do was get a list with true for the Views with the parameter but null for the Views without it, while throwing additional errors; that result also did not work as a mask in the List.FilterByBoolMask node. I quickly ran out of patience and decided to generate the mask list using a Python node, which turned out to be fairly easy.

Each Element in the Revit Model has a ParametersMap attribute, which is a map that contains all of the parameters the Element contains, accessible via the parameter Name, using the Contains(key) method for the ParameterMap object, where the key is the name of the parameter of interest. The potential for an error condition for Views without a View Name parameter can be handled by using try: and except: statements to build the mask list, as shown in the image below.

The Python node has two inputs, the first, IN[0], a list of Elements to be tested for the presence of a particular parameter, and the second, IN[1], a string representing the name of the parameter. The Contains method will return True if the Element's ParametersMap contains a parameter whose name matches the string passed to the Python node in IN[1]. If there is not a matching parameter name, it should return False; in testing, some of the Views were throwing an error, in which case the except: statement adds False to the output list.

The output from this Python node worked to remove the Views without a View Name parameter from the list of all elements of the Views category, allowing the rest of the graph to do the renaming of the Views without any error messages.