Wednesday, September 14, 2011

Get Those Child Styles Under Control

Have you ever created a child style, changed a setting on it, then wished that component property was still following the default setting from the parent style? This is especially apparent when changes are made to the Text Contents of a component. Before you go blaming the software for not working correctly, take a look at the style itself. It may be doing exactly what you told it to do.

Once you make a change to any part of a component of a style, an override is flagged on the Summary tab and that part of the component will no longer follow the changes made to the parent style. Here's a short exercise to show how it works:
  1. Create a new drawing from the "_AutoCAD Civil 3D (Imperial) NCS template" in Civil 3D 2012.
  2. In the Toolspace, Settings tab, locate the Structure Label Styles.

  3. Expand the Label Styles and select the label style named "Data with Connected Pipes (Sanitary)", right click, and choose Edit... from the list.

  4. After the Label Style Composer dialog box is open, select the Layout tab and verify that there are three components in this style: Structure Text, Incoming Pipes, and Outgoing Pipes.

  5. Now close this dialog box by left clicking on Cancel.
  6. Locate the Structure Label Style in the Toolspace Settings tab again. This time right click on the "Data with Connected Pipes (Sanitary)" style and choose "New..." from the list.

    This will create a child style of the selected label style.
  7. In the Label Style Composer dialog box, select the Information tab and edit the Name to: "Data with Connected Pipes (Sanitary) [Description Only]". You can also edit the Description for this label style on the Information tab at this time.
  8. Now select the Layout tab, then in the Component name: dropdown list, select "Incoming Pipes".

  9. Under the "General" section, locate the "Visibility" property . Change the value to False.

  10. Repeat this process for the Outgoing Pipes component too.
  11. Now select the Summary tab. In the Property column, left click on the by Component 2 to expand the properties of that component. 
In the Override column there should be a green check mark in the box in the General: Visiblity row. This means that even if you change this visibility state in the parent style, such as setting the value to False, the visibility state of this component will not change. There should be a green check mark in the box in the General: Visibility row of Component 3 as well. Left click on OK to complete these changes to the style.

Now to see how this change affects the parent style, edit the original label style. You can do this by repeating Step 3, then selecting the Summary tab. Left click on the by Component 2 and you'll see a gray arrow pointing down in the Child Override column. This indicates that this property has been overridden in at least one child style. If you want to remove this override from all the child styles, left click on the gray arrow. A small red x will appear near the bottom right side of the gray arrow to indicate that you will be removing these overrides. Left click on Apply. The Summary tab will refresh at this point and all expanded properties will collapse. Left click on the by Component 2 again and there should no longer be a gray arrow in the Child Override column of the General: Visibility row. You can edit the child style to verify that the Visibility of Component 2 was reset to True.

The point of this exercise was to show you how and when the overrides are created so that if your child style isn't responding the way you expect when a change is made to the parent style, take a look at the Summary tab and look for Overrides.

No comments: