Civil 3D: Contour Labels with smart Decimal Place

For a long time, I had wanted to have a smarter contour label that drops decimals.  Something like what is available for Stations type labels.  A modifier that could “Drop Decimal Value for whole numbers
 

ISSUE:

A function to drop whole value is not available for Contour type surface labels.  As shown below, the Surface Elevation label is set to two decimal places, it will always show no matter what contour elevation is. 

SOLUTION:

First, we will create two expressions that do the math to calculate when the elevation is whole or not.
Expression to Hide whole value  Expression to Show Decimal value
Name:  Hide_Decimal
Description:  Compares Values controls Height
Expression:  IF(Math=0,0,0.1/12)
Name:  Show_Decimal
Description:  Compares Values controls Height
Expression:  IF(Math=0,0.1/12,0)
 
Next, create a Contour Label with 2 Text components:
1. Whole (red): No decimal places.
2. Decimal (blue): 2 decimal places.
“Whole” text component: 0 decimal spaces
“Decimal” text component: 2 decimal spaces
 
Use the setup will be useful for situations when contours intervals are set less than whole values or when Surface analysis is used.

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 20 years of experience helping large and small, public and private clients in the eastern United States.

More Content by Leo Lavayen
Previous Video
What's New in AutoCAD 2027
What's New in AutoCAD 2027

Take a closer look at what’s new in AutoCAD 2027 with IMAGINiT’s AutoCAD expert, Ryan Wunderlich. In this ...

Next Article
Meet Autodesk Forma: The Next Evolution of Construction Cloud
Meet Autodesk Forma: The Next Evolution of Construction Cloud

Autodesk Forma is the next evolution of Autodesk Construction Cloud, bringing the same trusted tools into a...

Need tech support? Let us help!

Learn More