The information in this article applies to:
I would like to use the RoomVolume text macro in my room labels, but it displays four decimal points. How can I make it display fewer decimal places?
By default, many text macros are setup to simply display the raw, unrounded results of the calculation they perform, but you can easily modify the macro to round down to the nearest value of your choosing.
You now know how to apply a macro to a room label so that it displays the volume of the room with the actual output from the calculation. If you change the dimensions of the room to 20' x 20' for example, the results would contain a single decimal place.
Next, let's look at controlling the output of the macro.
vol = internal_area * (ceiling_elevation - floor_elevation) / 12
The room label now stops at the nearest hundredth rather than calculating out to the hundred thousand's place.
You can apply these concepts to other macros or objects that result in a long string of numbers as the room volume macro tends to do.
The language Chief Architect uses for its text macros is called Ruby, you can learn more about the different Ruby functions by visiting this online guide:http://ruby-doc.com/docs/ProgrammingRuby/.