Author Topic: Jigs and Point Monitor event  (Read 3146 times)

0 Members and 1 Guest are viewing this topic.

jsr

  • Guest
Jigs and Point Monitor event
« on: February 02, 2011, 08:40:10 AM »
HI all

I am relitevely new to .NET programming and came across JIGS recently. I saw a Circle Jig application in which a circle constantly appears below the aperture. I have seen one similar application written using PointMonitor event of Editor class. If we can do that (temporarily displaying entities with mouse movements) by monitoring such events why do we need jigs. Please guide.

Thanks.

kaefer

  • Guest
Re: Jigs and Point Monitor event
« Reply #1 on: February 02, 2011, 10:04:39 AM »
why do we need jigs.

Because it's not always necessary to reinvent the wheel, when a pre-packaged solution exists?

Just have a look at the relevant API signatures:

using Autodesk.AutoCAD.EditorInput;

protected internal abstract SamplerStatus Jig.Sampler(JigPrompts prompts)
protected internal abstract bool EntityJig.Update()
protected internal abstract bool DrawJig.WorldDraw(Autodesk.AutoCAD.GraphicsInterface.WorldDraw draw)
public InputPointContext PointMonitorEventArgs.Context { get; }


By overriding Jig.Sampler and EntityJig.Update or DrawJig.WorldDraw respectively you're ready to go, while there are lots of paraphernalia to consider for a working PointMonitor event handler that resembles a jig's functionality. Have a look at Norman Yuan's site http://drive-cad-with-code.blogspot.com, a few of his programs may be considered typical for the complexity that goes with the PointMonitor event.

Cheers, Thorsten