AddConstructionPoint in V6

cmdSampleTest.cpp (1.9 KB)
Hi~
The attached file is my test file.
This sample run in Rhino v5, it can auto detect point by use “AddConstructionPoint”.
But it run in Rhino v6, it can’t auto detect point by use “AddConstructionPoint”.

Could somebody help me to solve this problem?

The behavior is a result of this change: https://mcneel.myjetbrains.com/youtrack/issue/RH-42192

Construction points are now snapped to only when osnaps are enabled to make the snapping always be in sync with other osnaps.

To enable osnaps you can add these two lines to the beginning of the command:
bool bOsnapsEnabled = RhinoApp().AppSettings().EnableOsnaps();
RhinoApp().AppSettings().SetEnableOsnaps(true);

…and then revert the setting at the end of the command:
RhinoApp().AppSettings().SetEnableOsnaps(bOsnapsEnabled);

@mikko
Thank you very much.
Now It work fine ^ ^