I am developing an IntelliCAD .NET plugin and I am having trouble getting Object Snap / Entity Tracking to work during a DrawJig.
The workflow starts from a WinForms form. From the form, I create some entities and run a custom DrawJig to move/rotate/scale them before committing the transaction.
For rotation, I originally used JigPromptAngleOptions with prompts.AcquireAngle(), but Object Snap / Entity Tracking did not work during the jig. I then changed the rotation step to use JigPromptPointOptions with prompts.AcquirePoint(), using a base point and rubber band, and calculating the angle manually from the picked point.
Example:
```vb
Dim opt As New JigPromptPointOptions()
opt.Message = vbLf & "Rotate>"
opt.UseBasePoint = True
opt.BasePoint = basePoint
opt.UseRubberBand = True
opt.Cursor = CursorType.RubberBand
opt.UserInputControls =
UserInputControls.Accept3dCoordinates Or
UserInputControls.GovernedByOrthoMode Or
UserInputControls.GovernedByUCSDetect Or
UserInputControls.UseBasePointElevation
Dim res As PromptPointResult = prompts.AcquirePoint(opt)
Before calling Editor.Drag(jigger), I also call:
IntelliCAD.Internal.Utils.SetFocusToDwgView()
The rubber band is displayed correctly, and the jig updates visually, but Object Snap / Entity Tracking still does not snap to entities such as roof sheet/profile geometry while the jig is running.
If I use a normal Editor.GetPoint() from a command, Object Snap works. The problem appears specifically when point acquisition happens inside DrawJig, especially when the workflow is initiated from a WinForms form.
Questions:
Is Object Snap / Entity Tracking fully supported inside DrawJig with JigPrompts.AcquirePoint() in IntelliCAD .NET?
Are there additional UserInputControls flags or editor/system-variable settings required to enable running OSNAP during a jig?
Is starting the workflow from WinForms known to affect OSNAP behavior inside DrawJig?
Is the recommended approach to collect snap-sensitive points using Editor.GetPoint() in a command context, and use DrawJig only for visual preview/transformation?
Is there any equivalent of forcing or enabling OSNAP for JigPromptPointOptions?
Any guidance or sample code for DrawJig + Object Snap / Entity Tracking in IntelliCAD .NET would be appreciated.
Re: jig acquire / prompt getPoint from forms
#4This is an interesting issue, especially since AcquirePoint() works visually with the rubber band but still doesn’t trigger Object Snap or Entity Tracking inside the DrawJig. I’ve run into similar limitations with jig-based input in CAD APIs, where point acquisition inside a jig doesn’t always behave exactly like a normal Editor.GetPoint() call.
It would be helpful to know whether IntelliCAD has any specific UserInputControls flag, system variable, or internal API for explicitly enabling OSNAP/Entity Tracking during JigPromptPointOptions.AcquirePoint(). The fact that OSNAP works correctly with Editor.GetPoint() suggests the issue may be related to the jig input context rather than the WinForms workflow itself.
A recommended workaround would probably be to acquire the snap-sensitive point using Editor.GetPoint() in a command/editor context, then pass that point into the DrawJig for the visual transformation. If there is a supported way to get native OSNAP and tracking directly inside DrawJig, however, that would be much cleaner. I’d be very interested in seeing a working IntelliCAD .NET example.
It would be helpful to know whether IntelliCAD has any specific UserInputControls flag, system variable, or internal API for explicitly enabling OSNAP/Entity Tracking during JigPromptPointOptions.AcquirePoint(). The fact that OSNAP works correctly with Editor.GetPoint() suggests the issue may be related to the jig input context rather than the WinForms workflow itself.
A recommended workaround would probably be to acquire the snap-sensitive point using Editor.GetPoint() in a command/editor context, then pass that point into the DrawJig for the visual transformation. If there is a supported way to get native OSNAP and tracking directly inside DrawJig, however, that would be much cleaner. I’d be very interested in seeing a working IntelliCAD .NET example.