Hello everyone. I’m trying to get the rounding part of a unit but don’t know why. Can you help me with it?
you can use python script to get that, example for Currency
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from Autodesk.DesignScript.Geometry import *
from Autodesk.Revit.DB import *
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
# Place your code below this line
doc = DocumentManager.Instance.CurrentDBDocument
units = doc.GetUnits()
# old version
#options = units.GetFormatOptions(DisplayUnitType.DUT_CURRENCY)
# new
options = units.GetFormatOptions(SpecTypeId.Currency)
# Assign your output to the OUT variable.
OUT = options.Accuracy
3 Likes
@chuongmep Fantastic. That’s what I’m looking for. Thank you.