Macros to convert inches to feet & inches?


BrianSmith
 Share

Recommended Posts

Quote

While we're at it... anyone know how to have the "%room.dimensions%" macro show from framing instead of finished drywall?

 

You could try something like this:

%(room.dimension1+1.in).to_s("'-\"")% x %(room.dimension2+1.in).to_s("'-\"")%

 

Edited by DBCooper
Link to comment
Share on other sites

On 2/4/2026 at 8:24 AM, BrianSmith said:

Using preset macro "%room.height.ceiling%" to add ceiling height to Room Labels.

Does anyone know how to change this from inches to feet & inches?

 

On 2/4/2026 at 8:34 AM, Joe_Carrick said:

Try this macro

 

On 2/4/2026 at 8:40 AM, JonathanK said:

This is the one we use for the ft-in:

...

 

If you're running the latest version of X17, there's a little Easter egg hidden in the software that will both convert to feet and inches ('-") and set the rounding precision.  It looks like this:

 

%room.ceiling_height.to_s("'-\",16")%

  • Like 2
  • Upvote 1
Link to comment
Share on other sites

15 minutes ago, Alaskan_Son said:

 

 

 

If you're running the latest version of X17, there's a little Easter egg hidden in the software that will both convert to feet and inches ('-") and set the rounding precision.  It looks like this:

 

%room.ceiling_height.to_s("'-\",16")%

Great tip, and just for anyone's FYI this does output as a string, and is no longer a "measurement" class

Link to comment
Share on other sites

19 minutes ago, Renerabbitt said:

Great tip, and just for anyone's FYI this does output as a string, and is no longer a "measurement" class

 

True, but every solution to display as feet and inches is going to be in string form.  

Link to comment
Share on other sites

2 minutes ago, Alaskan_Son said:

 

True, but every solution to display as feet and inches is going to be in string form.  

Sorry Mike, I didn’t mean that as a correction I know you knew that , just letting people know in case they were trying to do something else with the measurement before an output

Edited by Renerabbitt
Link to comment
Share on other sites

2 minutes ago, Renerabbitt said:

Sorry Mike, I didn’t mean that as a correction I know you knew that , just letting people know in case they were trying to do something else with the measurement before an output

Right.  They would want to carry out any calculations before formatting.  So, if you wanted to subtract an inch and round to the nearest whole inch....

%(room.ceiling_height-1.in).to_s("'-\",1")%

 

...and bonus tip if you want to round to the nearest whole inch and keep the trailing zero if it lands at a whole foot...

%(room.ceiling_height-1.in).to_s("'-\",1").sub(/'$/, '\'-0"')%

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share