Question : which Accuracy value do I need for 1/32" ?
one more complexity here with rounding - Accuracy …
Online Documentation for Autodesk's Revit API: 2015, 2016, 2017, 2017.1, 2018
so If I want to get FRACTIONAL_INCHES and round to 1/32"
format = FormatOptions(DisplayUnitType.DUT_FEET_FRACTIONAL_INCHES,UnitSymbolType.UST_NONE, 0.25)
0.25 gives me Rounding: to nearest 3"
so does not match documentation description “…or example 0.25 to round to the nearest 1/4”
so which Accuracy value do I need for 1/32" ?
any help will be appreciated
there was similar topic here but I want to expand discussion here about rounding - Accuracy
Hey All,
I’m in the process of creating a portal frame ‘generator’ for a trial generative design through Robot - One slight issue I’m having is that my company Revit template is set in mm. For easiness within Dynamo, I’ve done this in metres, so I get the nice little grid! I don’t really want to have to keep changing Project Units each time. So I’m wondering whether this is possible through a python coding?
I’ve tried all node based parameter’s however I can’t seem to get Project Units. I’ve c…
Units discussion accuracy log:
Online Documentation for Autodesk's Revit API: 2015, 2016, 2017, 2017.1, 2018
https://thebuildingcoder.typepad.com/blog/2009/08/unit-conversion.html
Just a punt, but 0.25 is rounding to the nearest 3” and there are 12” in a foot, so it tallies (25% of 12).
1/32 of a foot = 0.375 of an inch, so try inputting 0.03125 which should round to the nearest 0.375”.
Thomas_Mahon:
0.03125
thanks @Thomas_Mahon for quick response it is close but
0.03125 gives me Rounding: to nearest 3/8"
SeanP
April 7, 2019, 2:17pm
4
What @Thomas_Mahon is getting at is the Revit unit system is in feet. Therefore you need to determine what 1/32" is to 1’. Something like .00260 = (1/32)/12
Yes @SeanP is correct - it needs to be a percentage of the fraction of the unit. So set the Accuracy value to 0.002604167 (1/32 of an Inch, not foot).
@SeanP thanks for help
@Thomas_Mahon thanks for detail solution
I am uploading script as will be good basis to everyone for handling units and all settings.
Once again I love fact that can count on community and your support here
Really appreciated!!!
UnitsCoversion_IP_SI.dyn (3.2 KB)
1 Like