Ruby Script Help


amddrafting
 Share

Recommended Posts

I'm using the script below to make ceiling height indicators in the framing plan and the current output is

 

9 FT-1 1/8 IN

 

using this code...

nf = NumberFormatter.new

nf.unit = 'ft-in'

nf.use_fractions = true

nf.denominator = 8

nf.show_unit = true

nf.apply(room.ceiling_elevation)

 

I want it to output 9'-1 1/8" instead.

 

Is it possible to do this without extensive coding?

Link to comment
Share on other sites

Nevermind... just found this exact example in the Ruby Script Tutorial :rolleyes:  

 

height = room.ceiling_elevation - room.floor_elevation

 

nf = NumberFormatter.new

nf.unit = "'-\"" # Hyphenated feet and inches

nf.use_fractions = true

nf.apply(height)

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
On 8/29/2024 at 6:18 AM, amddrafting said:

Nevermind... just found this exact example in the Ruby Script Tutorial :rolleyes:  

 

height = room.ceiling_elevation - room.floor_elevation

 

nf = NumberFormatter.new

nf.unit = "'-\"" # Hyphenated feet and inches

nf.use_fractions = true

nf.apply(height)

@amddrafting… I'm not too familiar with Ruby scripts. Could you let me know where to enter this data?

Thanks in advance!

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