With the arrival of Enhanced Styles in AutoCAD Map (and Civil) 3D 2012, a change was made as to how the program interprets the Math Functions in Expression Builder (Really, "Expression Builder" is just it’s street name. The official name of this is the Create/Modify Expressions dialog, that you get when you select an FDO layer, click Style, click under Feature Label, and in the Text context drop down choose Use Expression). In the past, when building a math expression, the Expression Builder expected a numeric value, and the syntax would have looked something like this:
Unpleasant, ay?
Don't worry, there’s just one thing you’ll have to change in your syntax. Simply wrap a ToString() function around your entire expression, and now try to validate.
And it works!
The scoop: due to the enhanced labeling functionality, the labels generated by Expression Builder are now string values. Because of this, you have to convert any numbers to strings before passing it to the string label. This is necessary whether you’re calculating a static number or a numeric attribute field. We do apologize to users for the abrupt change.
Happy expression building!
Subscribe
Twitter