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:
- First, we will do “Math” to check for the whole number.
- Next, an “If” statement is created that will show/hide the right of the decimal. To be used as 2nd Text Height value.
- Last, a two-component text label is created:
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
More Content by Leo Lavayen