MAP 3D Expressions
There are several ways to attach/import/connect to data using MAP 3D 2009, and a host of methods to choose from in terms of labelling features. In the previous post Tommie has brought up a good question, “So now how do you truncate an elevation property for a contour in a shape file attached via FDO?“
In MAP 3D 2009, as long as the object data is a real number, then the result can be rounded as follows:
Round ( Elevation , 0 )
To enter the data as shown above, first select the Math Function Round. Replace [number] with the Property you are rounding, and replace [optional number of decimals] with the rounding factor – 0 will round to the nearest whole number.
Here’s the catch Tommie: It doesn’t work in MAP 3D 2008, as a matter of fact, nothing works – rounding doesn’t work, RTOS doesn’t work, LISP doesn’t work period. In fact only one thing will get rid of the 6 extra zeros:
In the expression editor, type the following: (0+Elevation)
Where Elevation is the object data field. I think the lack of flexibility is – well – unfortunate.
In many cases though, I’d almost rather import the data and label objects based upon an annotation template. The following are just some of the expression goodies in my bag of tricks. By the way, again – these are defined in my MAP annotation template:
(strcat (rtos .LENGTH 2 2) “‘”) will produce the foot symbol.
(strcat (rtos .LENGTH 2 2) “‘ @ ” (angtos .ANGLE 4 3)) will return length’ @ angle.
(rtos .Elevation 2 2) will round off a number to the nearest 2 decimal places.
ANGTOS converts a number to a formatted string representing an angle. The syntax is (and the rtos syntax is the same): (angtos expression mode precision).
Modes:
Mode 0 = Decimal Degrees
Mode 1 = Degrees Minutes Seconds
Mode 2 = Grads
Mode 3 = Radians
Mode 4 = Surveyor’s Units
For example, if you need to label the bearing of a line using an annotation template, the expression would look like this:
(angtos .ANGLE 4 3)
And would yield this:
N 23d47’31″ E
Civil 3D Tutorials*
Register Today to access to our comprehensive library of Civil 3D Tutorials for as low as $20.
*Access to the Library is a free service to our clients.





