Civil 3D – Contour Labels Auto Decimal Place

For a long time, with Autodesk Civil 3D I have wanted a smart contour label that drops decimal values.  Something like what is available for Stations, a modifier that could “Drop Decimal Value for Whole”, but none are available by default.


Next, I then turned to Equations and was not able to come up with something simple.  I then found an old post for Crest and Sag Profile Labels, from a colleague James Mussleman.  In the post, equations are leveraged to controls text height.  Below we create a contour label based on the same idea:

  1. First, we will do “Math” to check for the whole number.


  1. Next, an “If” statement is created that will show/hide the right of the decimal. To be used as 2nd Text Height value.


  1. Last, a two-component text label is created:
    • The primary text will always be shown (“Elev-Lt”) with the whole value left of the decimal.
    • 4_Contours
    • The secondary portion of text (“Elev-Rt”) will autohide decimals based on the “If” statement used as height for values right of decimals.
    • 5_Contours

This setup will be useful for situations when contours are set less than whole values or when Surface analysis creates user-defined contours.




About the Author

Leo Lavayen

Civil Applications Expert<br><br>As an Applications Expert, Leo is responsible for supporting, training and implementation of software for survey and civil engineering professionals. He has more than 17 years of experience helping large and small, public and private clients in the eastern United States.

Visit Website More Content by Leo Lavayen
Previous Article
How to create custom linetypes in AutoCAD-based products
How to create custom linetypes in AutoCAD-based products

It’s very easy to create custom linetype now using Express Tools in AutoCAD. Make sure express tools are in...

Next Article
Standard vs. Spec Driven P&ID Projects
Standard vs. Spec Driven P&ID Projects

Should you configure the P&ID settings for a Plant project template to be Spec Driven?