Returns or sets the document's distance display precision parameter. See Rhino's DocumentProperties command (Units and Page Units windows) for details.
rhinoscriptsyntax.UnitDistanceDisplayPrecision (precision=None, model_units=True)
rhinoscript.document.UnitDistanceDisplayPrecision (precision=None, model_units=True)
precision |
Optional. Number. The distance display precision. If the current distance display mode is Decimal, then precision is the number of decimal places. If the current distance display mode is Fractional (including Feet and Inches), then the denominator = (1/2)^precision. Use UnitDistanceDisplayMode to get the current distance display mode. |
model_units |
Optional. Boolean. Return or modify the document's model units (True) or the document's page units (False). The default is True. |
Number |
If precision is not specified, the current distance display precision if successful. |
Number |
If precision is specified, the previous distance display precision if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
precision = 3
rs.UnitDistanceDisplayPrecision( precision )