I would like to use a text macro in my room labels, but it displays several 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.
In this example, we will copy the already-defined RoomVolume text macro and modify it to have two decimal places.
Note: If you would like custom text macros to be present in all files that you create, consider making the changes below to your template(s). For more information on templates, please see the Related Articles section below.
(internal_area * (ceiling_elevation - floor_elevation) ).to_cu_ft.round(2)
.round(2)
. By calling the round
function with an argument of 2
, we are telling the program to round the volume down to two decimal places. Note: If a room is not selected prior to accessing the Text Macro Management dialog as mentioned in Step 2 above, the Original Result and New Result fields in the Edit Text Macro dialog will instead display with Evaluation Errors. This does not mean the macro will not function correctly when used, just that it can't perform the function as an applicable room was not selected.
%RoomVolumeRounded%
, which is the name of the macro we just created.Note: If automatic room labels have already been populated prior to creating and inserting a Macro, the labels may need to be refreshed. This can be done by opening one or more rooms up to specification, making a change to the Room Type or Room Name, then clicking OK. Once the room labels have been refreshed, you can revert the change made to the Room Type or Room Name.