How to change window/door sizes from inches to feet-inches by macro file?


duongle0710
 Share

Recommended Posts

Hi, I'm using the X8 version now and I want to change window/door sizes from inches to feet-inches by macro file. However, I can't find the right macro file to import into Chief Architect. Does anyone has that macro and upload it here please? I'll be so appreciated. Thank you!

Link to comment
Share on other sites

For a label 

 

def to_ftin(n=16)
        arr = self.divmod(12)
     inch_frac = ((arr[1]-arr[1].floor)*n).round.quo(n)
        result = case inch_frac
        when Rational(1.0)
            "#{arr[0]}'-#{arr[1].ceil}\""
        when Rational(0.0)
            "#{arr[0]}'-#{arr[1].floor}\""
        else
            "#{arr[0].floor}'-#{arr[1].floor} #{inch_frac}\""
        end
        result
end

 

to_ftin(owner.width) + " x " + to_ftin(owner.height)

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