BrianSmith Posted February 4 Share Posted February 4 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? While we're at it... anyone know how to have the "%room.dimensions%" macro show from framing instead of finished drywall? Thanks. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 4 Share Posted February 4 (edited) Try this macro room_ceiling_ht_ft_in.json You might want to adjust the rounding within the macro. It's currently set to 1/16" Edited February 4 by Joe_Carrick 1 Link to comment Share on other sites More sharing options...
JonathanK Posted February 4 Share Posted February 4 (edited) This is the one we use for the ft-in: obj = owner obj = referenced unless referenced.nil? nf = NumberFormatter.new nf.unit = "'-\"" nf.use_fractions = true nf.apply(obj.room.ceiling_height) Edited February 4 by JonathanK Added picture. 1 Link to comment Share on other sites More sharing options...
BrianSmith Posted February 4 Author Share Posted February 4 Thank you Gentlemen! Link to comment Share on other sites More sharing options...
PitMan71 Posted February 4 Share Posted February 4 4 hours ago, BrianSmith said: While we're at it... anyone know how to have the "%room.dimensions%" macro show from framing instead of finished drywall? I don't think you can. Some of these macro gurus might be able to direct you on how to create your own macro. Link to comment Share on other sites More sharing options...
DBCooper Posted February 4 Share Posted February 4 (edited) 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 February 5 by DBCooper Link to comment Share on other sites More sharing options...
Renerabbitt Posted February 5 Share Posted February 5 On 2/4/2026 at 9:34 AM, Joe_Carrick said: Try this macro room_ceiling_ht_ft_in.json You might want to adjust the rounding within the macro. It's currently set to 1/16" its not set to anything because you didnt provide your global number formatter Link to comment Share on other sites More sharing options...
Joe_Carrick Posted February 5 Share Posted February 5 3 hours ago, Renerabbitt said: its not set to anything because you didnt provide your global number formatter Correct. Here's my set_Globals macro. It can be placed just about anyplace that will be executed early. set_globals.json Link to comment Share on other sites More sharing options...
Alaskan_Son Posted February 7 Share Posted February 7 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 room_ceiling_ht_ft_in.json You might want to adjust the rounding within the macro. It's currently set to 1/16" 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")% 2 1 Link to comment Share on other sites More sharing options...
Renerabbitt Posted February 7 Share Posted February 7 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 More sharing options...
Alaskan_Son Posted February 7 Share Posted February 7 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 More sharing options...
Renerabbitt Posted February 7 Share Posted February 7 (edited) 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 February 7 by Renerabbitt 1 Link to comment Share on other sites More sharing options...
Alaskan_Son Posted February 7 Share Posted February 7 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"')% 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now