Change Display precision


#1

How can I change that value using code?


(Menno Deij - van Rijswijk) #2

You can use RhinoDoc.DistanceDisplayPrecision

see

http://developer.rhino3d.com/api/RhinoCommonWin/html/P_Rhino_RhinoDoc_DistanceDisplayPrecision.htm


#3

thx @menno


#4

@menno RhinoDoc.DistanceDisplayPrecision is a readonly propierty…


#5

i cant try it now… but try to set ModelDistanceDisplayPrecision since decompiling rhinocommon show this:

   public int ModelDistanceDisplayPrecision
    {
      get
      {
        return UnsafeNativeMethods.CRhinoDocProperties_DistanceDisplayPrecision(this.m_docId, true, 0, false);
      }
      set
      {
        UnsafeNativeMethods.CRhinoDocProperties_DistanceDisplayPrecision(this.m_docId, true, value, true);
      }
    }

  public int DistanceDisplayPrecision
    {
      get
      {
        return this.ModelDistanceDisplayPrecision;
      }
    }

so it should be the same thing…


(Menno Deij - van Rijswijk) #6

Weird, but that should work yeah.

By the way, there’s no need to decompile, the source is on Github:


#7

I agree. by the way, I forgot about github… I just double click on the assembly property with jet brains :smiley: ty for remembering it :wink:


(Dale Fugier) #8

I think you want to use RhinoDoc.ModelDistanceDisplayPrecision which is a getter/setter.

– Dale