I would like to take advantage of my OSNAP settings while jigging my entity, so it looks like it sticks to the closest snapped point while user is still moving the cursor.
I was trying to use some of the Editor selection methods, but it doesn't seem to work.
The Editor functionalities such as selections cannot be performed while the jig is running.
A solution to implement this requirement is to set the osnap options before starting the jig, to “End Point” for example. That can be done programmatically as well using the OSMODE system variable. Then inside your jig use a PointMonitor to get the snapped point.
Here is an example of my Jig class that illustrates that. A full sample is available as attachment:
class CoSnapJig : EntityJig
private Point3d _previousPos;
private Point3d _position;
private Editor _ed;
public CoSnapJig(): base(new DBText())
_ed = Application.DocumentManager.MdiActiveDocument.Editor;
DBText dbTxt = (DBText)Entity;
dbTxt.TextString = "Jigged DBText";
void ed_PointMonitor(object sender, PointMonitorEventArgs e)
_position = e.Context.ComputedPoint;
public new Entity Entity
protected override SamplerStatus Sampler(JigPrompts prompts)
JigPromptPointOptions options =
new JigPromptPointOptions("\nSpecify position: ");
options.UserInputControls = UserInputControls.NoZeroResponseAccepted;
options.Cursor = CursorType.Crosshair;
PromptPointResult promptRes = prompts.AcquirePoint(options);
if (_previousPos == promptRes.Value)
_previousPos = promptRes.Value;
protected override bool Update()
DBText oTxt = (DBText)Entity;
oTxt.Position = _position;
public PromptStatus Run()
PromptResult promptResult =