The Issue:
During a recent template creation, a client wanted perpendicular, Station/Offset labels for the Left and Right side of an Alignment that would automatically flip, as the default would only maintain its original reference rotation.
The Goal:
Instead of duplicate labels for ALL the label options we wanted to create something smart enough to know what side of the Alignment the label was at and automatically flip/rotate.
The Technique:
A few things went into the making of this dynamic label as there is no default embedded function within the label, we had to approach the solution via an Expression. Initially I attempted to use the “Side” property, but it did not work as expected.
The solutions were achieved with an expression, called “Side”: DEG2RAD(IF(Offset<0,0,180))
- Use the “Offset” value, negative or positive to determine left (-) or right (+) side,
- Embedded with an “If” statement that will issue a 180 flip when greater than (<) Zero Value
- And because the way Civil 3D calculates angles, I added a DEG2RAD function.
We then also wanted to add a gap (0.01) to space the Label from the Marker and built another expression based upon the same idea as above, called “Ofst”: IF(Offset<0,0.01,-.01)
The Expressions can be seen below from the Toolspace > Settings tab > Alignments > Labels > Station and Offset
The label style itself used the “Side” expression for its Rotation Angle and the “Ofst” expression for the Y offset value
I hope you guys have fun with this simple and awesome way to create smart Alignment Offset Labels and this serves as a reminder of what Expressions can do for you.
About the Author
Follow on Linkedin More Content by Kevin Stacy









![Failed to retrieve a Autodesk Vehicle Tracking license [Error code 3- this product has not been registered with the licensing service yet]](https://content.cdntwrk.com/mediaproxy?url=https%3A%2F%2Fres.cloudinary.com%2Fuf-554092%2Fimage%2Fupload%2Fv1781788620%2FVTError_gp5cfk.png&size=1&version=1784012402&sig=90d6bf9682772a28997f22a8034d6215&default=)










