February 20, 2012

Deleting Views in Revit

A reminder to myself (and a tip to anyone else who has not run into this yet): A View that has a revision cloud for a revision sequence that has been marked as "issued" cannot be deleted, as that would change the revision. Assuming that the revision clouds are "incidental", you have to temporarily uncheck the box in the Issued column of the Sheet Issues/Revisions dialog for the revision sequence(s) associated with revision clouds in that View.

In my case, a view for exporting a plan view to CAD was created as a duplicate with detailing, from a view which already had revisions clouds from issued revisions. Duplicate with detailing was chosen because we wanted to include the room tags, and the revision clouds were never removed from the duplicated view. I now want to delete the view completely. It is not necessary to clear the check mark in the Issued column, turn on the display of clouds and tags and delete the revision clouds; simply making the relevant revision sequences unissued is enough to be able to delete the view. Be sure to change the revisions back to "issued" when you are done.

February 16, 2012

ACA Structural Member Styles - Part 4

First Article in the Series (Structural Member Catalog)
Previous Article in the Series (Manually Created Structural Member Shapes - Fun Facts)

Manually Created Structural Member Styles
As we have seen in the first three articles in this series, there are a number of opportunities for having AutoCAD® Architecture generate a Structural Member Style automatically. When you need a Structural Member Style that has a single Structural Member Shape for both the start and end shapes, with no offsets, then you will want to take advantage of the automatic features. Even when you have a more complicated need, starting out by generating the style automatically may help save a few steps along the way. When the automatically generated styles will not meet your needs, you will need to either create a new style or edit a generated style. This article will take a look at some of the things you can do with manually created Structural Member Styles.

Structural Member Geometric References
Understanding how ACA labels the axes of a Structural Member is key to avoiding confusion when specifying the parameters we are about to examine. The diagram below shows the polyline from the High Detail shape for the W24x76 shape, inserted "as created" relative to the World UCS. The blue UCS Icon in the lower left corner shows the axes of the World UCS. For this shape, the insertion point was defined at the geometic midpoint of the shape. The X-axis of a Structural Member runs along the length of the member; the positive direction is from the starting point to the ending point. The Y-axis and the Z-axis are perpendicular to the X-axis. For a shape with no rotation, the positive Y-axis is the same as the World UCS positive X-axis of the shape and the positive Z-axis is the same as the World UCS positive Y-axis.
Confused? Keep the diagram above handy when editing the parameters of a Structural Member Style.

Another thing to keep in mind when setting up your Structural Member Style is that the final position of the shape(s) you define will depend upon the Justify property (found in the Dimensions category on the Design tab of the Properties palette) of the Structural Member. Baseline will place the insertion point of a shape at the starting point of the Structural Member, if no offsets have been applied to the shape. Middle Center will put the geometric midpoint of the shape(s) (with offsets, rotations and mirror applied, as applicable) at the starting point of the Structural Member, for the Medium Detail and High Detail geometry. Applying different offsets to the start and end shapes will also affect the calcuation of the geometric midpoint. Most Structural Member Styles will not need to be that complex; should you need to create one with that level of complexity, you will want to start as simply as possible, checking the effects of each edit before making the next one.

Automatic Structural Member Style
First, we will look at the automatically generated W24x76 Structural Member Style that was created in Part 1, to get an understanding of the inner workings. With a drawing open in which the W24x76 Structural Member Style has already been created, on the Manage ribbon tab, on the Style & Display panel, select the Style Manager tool to open the Style Manager dialog. In the left pane, expand the Architectural Objects and Structural Member Styles nodes and select the W24x76 style. [Make certain you are under the Structural Member Styles node, and not the Structural Member Shape Definitions node.]

The General tab of a Structural Member Style has the usual features found when editing other styles and definitions. You can edit the Name, provide a more detailed Description, add a Keynote, attach Notes and attach Property Sets. In addition, you can specify whether or not objects of this style can act as boundaries for associative Spaces. As you can see below, an automatically generated style only has the Name you specified at the time of generation; you will have to add the Description, Keynote, Notes and/or style-based Property Sets that you want.
The heavy lifting for a Structural Member Style takes place on the Design Rules tab.
The W24x76 shape has a single Component, called Section. Structural Member Styles can have multiple Components; the display system allows for display control over a maximum of ten. The Add, Copy and Remove buttons in the lower right side of the Design Rules tab allow you to add a Component, add a copy of an existing Component or remove an existing Component, respectively. You can give each Component a name of your choosing, which can help when editing the display properties at the style- or object-override levels. Each Component has two sets of parameters associated with it, one set for the Start Shape and one set for the End Shape. If you are not seeing these, then the button labeled Hide Details in the image above will read Show Details; click it to show the parameters.
  • Name The name parameter specifies the Structural Member Shape Definition assigned to this component, selected from a drop-down list of the shapes defined in the current file.
    Most times you will want to have all of the shapes you need defined before creating the Structural Member style. If the End Shape is to be the same as the Start Shape, and have the same Scale, Mirror, Rotation and X, Y and Z Offsets as the Start Shape, choose the same shape name, preceeded by an asterisk, from the End Shape Name drop-down. This will lock out those properties for the End Shape and assure that any changes made to the Start Shape will also be made to the End Shape. (This is the initial default when adding a new Component.) You can still specify the Relative to and Node parameters for the End Shape. If you want to use the same shape, but change anything other that Relative to and Node, choose the shape name without the initial asterisk from the End Shape Name drop-down list.
  • Relative to The Start and End Shapes can be placed relative to either the very Start of the Structural Member or the very End of the Structural Member, by selecting either Start or End from a drop-down list. For an automatically generated, single-shape style, the style will be based on a single segment member, with the Start Shape set relative to the Start and the End Shape relative to the End.
  • Node The Node parameter is an integer that indicates the Node number (relative to the Structural Member end specified in the Relative to parameter). A single-segment style has two Nodes, 0 and 1. Multiple-segment styles will always have one more Node than the number of segments. When Relative to is set to Start, the 0 Node is the first Node of the Structural Member, the 1 Node is the second Node, et cetera, with the highest number Node being the last Node. When Relative to is set to End, the numbering is reversed, with the last Node being the 0 Node, the second-to-last node being the 1 Node, et cetera, with the highest number Node being the first Node. That is why, in the W24x76 style, both the Start Shape and the End Shape are at Node 0. These are not the same Nodes, since the Relative to settings are Start and End, respectively.
  • Scale You can apply a real-number scale factor to the shape, to uniformly increase or decrease the size of the shape from what is defined in the Structural Member Shape Defintion. This can allow a single definition to serve multiple sizes, when a single scale factor works for resizing the shape.
  • Miror The Mirror parameter has a drop-down list with two choices, Yes or No. Yes will mirror the shape about the Z-axis of the Structural Member.
  • Rotation The Rotation parameter takes a real-number angle value (in the drawing's current angle units), and rotates the shape about the shape's insertion point.
  • X Offset The X Offset is a real number distance value (in the drawing's current linear units) and specifies an offset along the Structural Member's longitudinal axis from the Node at which the shape is placed. Positive values move the shape in the direction from the starting point toward the ending point.
  • Y Offset The Y Offset is a real number distance value (in the drawing's current linear units) and specifies an offset along the Structural Member's Y-axis. (Refer to the first image above.)
  • Z Offset The Z Offset is a real number distance value (in the drawing's current linear units) and specifies an offset along the Structural Member's Z-axis.
The final parameter of each Component is the Priority. You can ignore this for single-component styles or for single-segment (two nodes, 0 and 1) styles. Priority is used to control the mitering of components meeting at a common node. Components with the same priority will miter with each other, even if they do not intersect (provided there are no X offsets); components with different priorities will not. The Priority parameter can also be used to limit the justification of a structural member to just those components with the highest priority. This is done using the Justify components property on the Design tab of the Properties palette, found under the Basic category and Dimension sub-category. You can have the justification based on All components, or Highest priority only components.

Manual Structural Member Style Examples
The Start and End Shapes can be the same, as in the W24x76 style examined above, but they need not be. If different shapes are specified, ACA will transition from the Start Shape to the End Shape over the length of the component. For example, if the Start Shape is a 24x24 square and the End Shape is a 12" diameter circle, both with insertion points at the center of the shape, and added without any translations or rotations...
...you get something that looks like this.
Making a copy of the W24x76 Structural Member Style, changing the End Shape Name to W24x76 (without the asterisk) and applying a 90-degree rotation to just the End Shape...
...results in a Structural Member that does this.
In the W24x76 Double Structural Member Style shown below, I started out with a copy of the W24x76 Structural Member Style, selected the Section component and used the Copy button to create a copy of the Section component. I renamed the copied component to Section2 and then added Y Offsets of -9" to the Section component and 9" to the Section2 component.
This creates a double column.

Next Article in the Series (Structural Member Contextual Ribbon Tab)

February 12, 2012

ACA: Extracting Text from a Style Name

In a recent reply post in the Getting steel beam size thread in the Autodesk AutoCAD® Architecture Discussion Group, Dallas asked if there was a way to automatically extract a value embedded in the name of a Structural Member Style. The specific example was if the style name were to include the shape size followed by the depth in parentheses: W16x45 (16.13).

I replied with a file attachment that had a sample file demonstrating that this was possible. The style-based StrMembStyles01 Property Set Definition, which applies to Structural Member Styles, in that file contains an Automatic property called Style that uses the Style automatic property source to make the style name available. The MemberDepth property uses the following VBScript code to extract the value between the parentheses in the style name and convert it to a real number:
styleName = "[Style]"
startChar = InStr( "[Style]",  "(" ) +1
endChar = InStr(  "[Style]",  ")" )
strLen = endChar - startChar

If strLen <= 0 Then
 memberDepth = 0
Else
 memberDepth =  Mid( styleName, startChar, strLen )
End If

If Not IsNumeric( memberDepth ) Then
 memberDepth = 0
End If

RESULT = CDbl(memberDepth)
Notes:
  1. The first line assigns the text string in the [Style] property to the variable styleName. As always, you cannot simply type or paste a property reference in a formula property. You have to insert them by placing your cursor in the upper left edit box and then double click the property in the list in the lower left box.
  2. The second line uses the VBScript InStr function to determine the position of the first character of the depth value embedded in the style name, which is presumed to be the first character after the first open parenthesis character, "(", found in the string. This is saved in the variable startChar.
  3. The third line also uses the InStr function to save the position of the first close parenthesis character, ")", to the variable endChar. In both the second and third lines, I probably should have used the styleName variable in lieu of additional references to the [Style] property.
  4. The fourth line assigns difference between startChar and endChar to the variable strLen, which is the length of the string that gives the member depth. Using the InStr function with delimiter characters avoids the need to have a fixed number of characters before the depth value and a fixed number of characters for the depth. The only requirement is that the first "(" character in the name immediately precede the depth value, and the first ")" character immediately follow the depth value.
  5. At this point, we have all of the information we need to get the string representing the member depth. If the Property Set gets attached to a Structural Member Style whose name is not properly formatted (no parentheses, first "(" is either preceded by or immediately followed by the first ")", one or more non-numeric characters between the first "(" and ")") and the resultant string is converted to a double precision number, an error will result. The formula property is set up to return a depth of 0 for improperly formatted style names. All of the mentioned error conditions except for non-numeric characters will result in a string length of 0 or less. The first If statement checks for this condition and sets variable memberDepth to 0 if true; otherwise it extracts the string between the first "(" and first ")".
  6. The second If statement tests the extracted string to verify it either is numeric or is a string that can be evaluated as numeric using the IsNumeric function, preceded by the Not operator. If the extracted string is not numeric, the value of memberDepth is reset to 0, otherwise, it is left as is.
  7. At this point, the value of memberDepth is either 0 or a numeric string, and can be converted to a double precision real number using the CDbl function. It is up to whatever additional use you make of this property to determine how to handle a value of 0.
Download the sample file attached to my post to see this formula property in action.

February 09, 2012

ACA Structural Member Styles - Part 3A

First Article in the Series (Structural Member Catalog)
Previous Article in the Series (Manually Created Structural Member Shapes)

Manually Created Structural Member Shapes - Fun Facts
Here are a few additional items of interest related to Structural Member Shapes that I have discovered as I was experimenting for the next main article in this series.
  1. In order to maintain maximum sanity, set the UCS to World and use the Plan command to orient the screen so that the X-axis is left and right, with positive in the right direction and the Y-axis is up and down, with positive in the up direction. In limited experimentation with a single, 2D polyline as the shape, it appears that the shape will be imported with the World Y axis (or its equivalent, if the plane of the polyline is not parallel to the World X-Y plane) running vertically in the dialog, with positive being up. For example, if you start with the World UCS and rotate the UCS about the Z-axis, that rotation is ignored when bringing the shape into the dialog. When selecting the insertion point, the values of the point selected in the current UCS are used, but are applied relative to the World UCS. In other words, ACA does not translate the insertion point picked from the current UCS to the World UCS, so the insertion point can end up in a very unexpected location, unless it is 0,0 and 0,0 is the same in both the World and current UCS. Someone with a better head for three-dimensional geometry than me may be able to deal with this, but for me, best practice will be to start out with UCS set to World and the screen oriented to the Plan view of the World UCS.
  2. 2/10/2012 UPDATE: The following comment only applies to a Structural Member Style that has a single Structural Member Shape assigned to a single component. Insertion points do matter when more complex styles are created.
    2/10/2012 UPDATE 2: Insertion points always matter. The effects I was seeing and which prompted the following comment were due to the fact that all of the Structural Members I had created had their Justify property set to Middle Center, which places the geometric midpoint of the overall assembly at the starting point of the Structural Member. Setting the Justify property of the member to Baseline will place the insertion point of the shape at the starting point of the structural member, provided there are no Y Offsets or Z Offsets. The part of the comment regarding the Low Detail insertion point remains valid, however. Wherever the Medium Detail insertion point of a shape ends up, that is where the Low Detail insertion point for that Shape will also be.
    When assigning a Structural Member Shape to a Structural Member Style, the insertion point selected for the Shape will not necessarily be on the longitudinal axis of the Structural Member. For Medium Detail and High Detail, the shape is intially aligned at the "midpoint", with the midpoint being the point whose X-coordinate is the average of the shape's smallest and largest X-coordinate values and whose Y-coordinate is the average of the shape's smallest and largest Y-coordinate values. Even if you intentionally offset the High Detail insertion point from the Medium Detail insertion point, both will come in with the midpoint of each at the longitudinal axis of the Structural Member. The selected insertion point does matter for the Low Detail geometry, which does not have to be a closed shape and can have lines and arcs. Low Detail geometry will be placed such that its selected insertion point remains aligned with the selected insertion point of the Medium Detail geometry.
Next article in the series (Manually Created Structural Member Styles )

February 04, 2012

ACA Structural Member Styles - Part 3

First Article in the Series (Structural Member Catalog)
Previous Article in the Series (Structural Member Wizard)

Manually Created Structural Member Shapes
For those times when you want to create a Structural Member Style that does not have a standard cross-sectional shape, you will need to manually create the Structural Member Shape Definition and then add it to a Structural Member Style.

If you enjoy working from prompts on the Command: line, then you can use the
-AecsMemberShapeDefine command to do so. I find it easier to use the Style Manager, so that is the method that will be shown here. Before we dive into creating a custom Structural Member Shape Defintion, lets take a look at one, so we understand how it works. Structural Member Shapes support three levels of detail: Low Detail, Medium Detail and High Detail. Low Detail graphics can consist of lines, arcs, cirles or polylines. The image below shows the W24x76 Member Shape Definition (created from the Structural Member Catalog in Part 1 of this series) on the Design Rules tab in the Style Manager. This tab features a viewer pane that shows the cross-sectional geometry associated with this shape. Selecting Low Detail in the upper right corner highlights the Low Detail geometry in green; the Medium and High Detail geometry remains visible in the viewer, in white. A small "x" indicates the insertion point for the shape. As always, click on any image to see a full size version. If your browser replaces the current page with the image, use the Back button to return here.
Low Detail is intended for small-scale drawings, such as overall floor plans, where representing a wide-flange shape by three lines would be an appropriate level of detail.

The Medium and High Detail graphics have to be closed polylines, splines, elipses or cirlces. You can have more than one of these objects, but they cannot intersect each other, nor can they self-intersect. The Medium Detail graphics for the W24x76 Member Shape Definition consists of a single closed polyline showing the overall size and thickness of the web and flanges, and is appropriate for medium scale representations.
The High Detail graphics for the W24x76 shape also consist of a single, closed polyline, but differ from the Medium Detail graphics in that the fillets between the flanges and the web are shown. This would be appropriate for a large scale representation of the shape.
Each Structural Member Shape Definition must have Medium Detail geometry assigned. The Medium Detail geometry will be used for shapes where geometry is not specified for the Low Detail and/or High Detail conditions. For simple shapes, such as a circular column, assigning geometry to just Medium Detail may be appropriate. A square shape (with a side of 1'-0" for imperial units or 300 mm for metric units) is initially assigned when you create a new Structural Member Shape Definition, so be certain to replace that with the desired geometry. In the out-of-the-box Display Representations for Structural Members, the Structural Member Shape is used for the "Visible Comp n", "Hidden Comp n" and "Component n" Display Components, where n is an integer from 1 to 10. (Structural Members offer display control for up to 10 different components.) The Display Representation that have "Low" in the title use the Low Detail shape. The Display Representation that have "High" in the title use the High Detail shape. All others use the Medium Detail Shape. ("Logical" is a special case, which does not display any of the shapes.)

In the following example, a Structural Member Shape Definition will be created for eventual use in a Structural Member Style that will represent an architectural column cover. A simple circle will be used to represent the cover for Low Detail. In Medium Detail, two circles will be used to show the outside and inside faces of the cover. For High Detail, a closed polyline will represent the detailed profile of the cover. You will need to create the necessary geometry for your shape first, then assign it to a definition.
On the Manage ribbon tab, on the Style & Display panel, select the Style Manager tool. In the left pane of the Style Manager, expand the Architectural Objects and Structural Member Shape Definitions nodes under your current drawing and then select the Structural Member Shape Definitions node. In images below, I have selected the Filter Style Type tool (funnel icon) in the toolbar at the top of the Style Manager dialog to show only Structural Member Shape Definitions. In the right pane, right click and choose New from the context menu. Enter an appropriate name for the new definition - the example definition is called Fluted Column Cover.

In the left pane, select the name of the new definition. Select the General tab in the right pane, and add a more detailed description and, if you want, notes for this definition.
In the left pane, select the Design Rules tab. Take a look at the upper right corner, in the Shape Geometry area. The caution icons in front of the Low Detail and High Detail choices indicate that no geometry has been assigned. As mentioned above, there is already default geometry assigned to Medium Detail for the shape, and the preview window shows the default square shape.
To assign the right geometry for Medium Detail, make certain that Medium Detail is selected in the Shape Geometry area, and then select the Set From button. This will temporarily hide the Style Manager dialog, and, at the Command: line, prompt you to "Select a closed polyline, spline, ellipse, or circle for an outer ring:". Select the outermost geometry ("ring") for Medium Detail.
After selecting the outer ring, you will see the prompt "Insertion point or [Add ring/Centroid]:". Selecting an insertion point or choosing the Centroid as the insertion point will end the ring selection process. In this example, Medium Detail has a second ring, so choosing the Add ring option is appropriate. Continue to choose the Add ring option and select rings until all rings have been selected, and then select an insertion point or use the Centroid option to set the insertion point at the centroid of the selected geometry. This will bring the Style Manager dialog back on the screen, with the newly selected geometry displayed in the preview window.
If you have Low Detail and/or High Detail geometry for your shape, select the Low Detail or High Detail item in the Shape Geometry area and repeat the process of selecting the Set From button and following the prompts. Low Detail will not ask for an outer ring, just lines, arcs, circles or polylines and will not offer Centroid as an option for selecting the insertion point. Make certain that the insertion point for each detail level is the same, relative to the selected geometry. The image below shows the completed Fluted Column Cover Structural Member Shape Definition, with High Detail selected.
You can create a single-shape Structural Member Style that uses your new shape by selecting the Create Style button on the Design Rules tab. The default name for the Structural Member Style will be that of the Structural Member Shape Definition; you can edit the name if you want.
The image below shows an instance of the generated Fluted Column Cover Structural Member Style with the Masonry.Stone.Travertine.Cream Material Definition applied, in Realistic View.
Next article in the series (Manually Created Structural Member Shapes - Fun Facts )