jbaehmer Posted March 7, 2014 Share Posted March 7, 2014 I had rec'd a stair macro on here a month or so ago. Finally getting around to working with it. I am having issues with getting it to display how I want it displayed. The fractions don't seem to reduce and one doesn't calc out correctly. Any thoughts? I have attached an example. Link to comment Share on other sites More sharing options...
GerryT Posted March 7, 2014 Share Posted March 7, 2014 Need to see your example -- Should not be a problem. Link to comment Share on other sites More sharing options...
jbaehmer Posted March 7, 2014 Author Share Posted March 7, 2014 Sorry...thought I had attached it earlier. Learning this new site. Stair Macro.plan Link to comment Share on other sites More sharing options...
Joe_Carrick Posted March 7, 2014 Share Posted March 7, 2014 Try this macro for riser height: inches =nR.floor frac =( (nR-inches)*16).round.quo(16) case when frac == 1 result = "#{inches + 1}" when frac == 0 result = "#{inches}" else result = "#{inches} #{frac}" end result This macro for number of treads: num_treads This macro for length of run: # Displays Stair Length (Total of Treads) nL = num_treads * tread_depth # Convert Decimal Values to Fractions inches = nL.floor frac =( (nL-inches)*16).round.quo(16) case when frac == 1 result = "#{inches + 1}" when frac == 0 result = "#{inches}" else result = "#{inches} #{frac}" end #Display Results 'Length = '+result+'"' and here's one for the total height of a run: arr =(total_risers*riser_height).divmod(12) inch_frac = ((arr[1]-arr[1].floor)*16).round.quo(16) result = case when inch_frac == 1.0 "#{arr[0]}'-#{arr[1].ceil}"+'"' when inch_frac == 0.0 "#{arr[0]}'- #{arr[1].floor}"+'"' else "#{arr[0].floor}'-#{arr[1].floor} #{inch_frac}"+'"' end result Link to comment Share on other sites More sharing options...
GerryT Posted March 7, 2014 Share Posted March 7, 2014 Using a helper function" -- You will have to open the macro manager and click the ft_in once to enter it into the plan -- Bummer 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