Label Expression Examples

Converting Northings and Eastings to Polar Coordinates

You can create expressions for point labels to convert northings and eastings to polar radius and polar angle values. These expressions compute the radius and angle from the coordinate system origin to the point.

Polar Radius Expression Syntax:

SQRT (Northing^2 + Easting ^2)

Format as Distance.

Polar Angle Expression Syntax:

ATAN2 (Northing, Easting)

Format as Angle.

Converting Astronomic Direction to Magnetic Direction

All internal angle calculations in AutoCAD Civil 3D are done in radians. You can take this into account when you apply a formula to an angle, such as when you label a line with both a true direction and a magnetic direction.

To subtract a 15d 30' 15" magnetic declination from an astronomic direction to derive the magnetic direction, you can set up the following expression:

Known:

PI = 3.141592654

360 degrees = 2(pi) radians

1 radian = 57.29577951 degrees

Given:

15d 30' 15" = 15.50417 degrees

Expression Syntax:

{Segment Direction} - (15.50417*((2*pi)/360))

Or alternatively using the built-in functions as follows:

{Segment Direction} - DEG2RAD(15.50417)

Format the result as Direction.

Tower Top Elevation

You can create expressions for surface spot elevation labels to calculate the sum of the height of a structure such as an airport control tower with the ground elevation.

Tower Top Expression Syntax:

{Surface Elevation+ 228.5}

In this example, 228.5 is the height of the structure.