How to change absolute tolerance by RhinoSDK?

I want to change absolute tolerance by RhinoSDK.
Not using dialog.

How can I do?


this should do it.


Hi Clement,

I use C++ Rhino5 SDK.
There is no CRhinoDoc::ModelAbsoluteTolerance().

@Vaker, sorry i thought you are using RhinoCommon. The closest i could find is this example:

I am sure @dale knows a better answer.


Hi Clement,

It works.
Thanks for your help.

This should do the trick:

CRhinoCommand::result CCommandTest::RunCommand(const CRhinoCommandContext& context)
  // Copy...
  ON_3dmUnitsAndTolerances model_units = context.m_doc.Properties().ModelUnitsAndTolerances();
  // Modify...
  model_units.m_absolute_tolerance = 0.01;
  // Update...
  return CRhinoCommand::success;

– Dale