Exercise 6: Creating a Label Style that Refers to Another Object

In this exercise, you will use the reference text component to create a single label style that annotates two objects of different types.

The Reference Text label component is used to annotate multiple types of objects with a single label. You can insert references to surfaces, profiles, parcels, and alignments. Each reference text component can refer to only one AutoCAD Civil 3D object. If you need a label style to refer to several objects, create a separate reference text component for each referenced object.

In this exercise, you will create a label style that displays the alignment station and surface elevation at each horizontal geometry point.

This exercise continues from Exercise 5: Changing a Label Style.

Create a label style that refers to another object

    Note:

    This exercise uses Labels-5c.dwg with the modifications you made in the previous exercise.

  1. In Toolspace, on the Settings tab, expand the AlignmentLabel StylesStationGeometry Point collection. Right-click Perpendicular With Tick And Line. Click Copy.
  2. In the Label Style Composer dialog box, on the Information tab, for Name, enter Surface Elevation at Alignment Station.
  3. Click the Layout tab.

    You can use this tab to create and edit label style components. You will modify the existing line and geometry point components, and then create two new label components for the new label style. The first component will display the surface elevation, and the second component will display the alignment station.

  4. Under Component Name, select Line. Specify the following parameters:
    • Start Point Anchor Component: Tick
    • Start Point Anchor Point: Middle Center
    • Length: 15.00mm
  5. Under Component Name, select Geometry Point & Station. Specify the following parameters:
    • Anchor Component: Line
    • Anchor Point: End
    • Attachment: Middle Left
    • X Offset: 2.00mm
  6. Click the arrow next to . Click Reference Text.

    A reference text label component refers to other object types in the drawing, instead of to the object type you are labeling. In this case, the reference text component will refer to a surface object.

  7. In the Select Type dialog box, select Surface. Click OK.
  8. In the Label Style Composer dialog box, specify the following parameters:
    • Name: Elevation
    • Anchor Component: Geometry Point & Station
    • Anchor Point: Bottom Left
    • Attachment: Top Left
  9. Under Text, in the Contents row, click the Value cell. Click .
  10. In the Text Component Editor dialog box, in the preview pane, replace Label Text with EL:. Under Properties, select Surface Elevation . Click to move the Surface Elevation property to the preview pane.

    The property block in the preview pane should look like this:

    EL: <[Surface Elevation(Um|P3|RN|AP|Sn|OF)]>

  11. Click OK.
  12. In the Label Style Composer dialog box, click the General tab. Set the Flip Anchors With Text property to True.

    Using this setting ensures that when the labels are flipped to maintain plan readability, they will display as mirror images of the original labels.

  13. In the Label Style Composer dialog box, click OK.

To apply the label style that refers to another object

  1. In the drawing, pan to the intersection of the Main Street and East Street alignments.
  2. Click Annotate tab Labels & Tables panel Add Labels menu AlignmentAdd/Edit Station Labels. Click one of the station labels on the East Street alignment.
  3. In the Alignment Labels dialog box, specify the following parameters:
    • Type: Geometry Points
    • Geometry Point Label Style: Surface Elevation At Alignment Station
  4. Click Add.
  5. In the Geometry Points dialog box, click to clear all check boxes. Select the Alignment Beginning check box. Click OK.
  6. In the Alignment Labels dialog box, click OK.
  7. Drag the label to a clear location, if necessary.

    Notice that the label is added to the alignment, but the elevation value is displayed as ???. These characters are displayed because you have not associated a surface with the Elevation component.

    Label style that refers to an alignment and surface, with no surface associated with the label

  8. Ctrl+click the Surface Elevation At Alignment Station label. Right-click. Click Label Properties.
  9. In the Properties palette, under Reference Text Objects, click the cell to the right of Surface Elevation At Alignment Station . Click the drop-down list and select the surface name that appears in the list.

    Examine the label. The surface elevation at the intersection of the alignments is now displayed.

    Label style that refers to an alignment and surface

  10. Press Esc to deselect the label.

To continue to the next tutorial, go to Using Expressions in Labels.