EntityJig + DrawOverRule

EntityJig + DrawOverRule

O_Eckmann
Mentor Mentor
358 Views
2 Replies
Message 1 of 3

EntityJig + DrawOverRule

O_Eckmann
Mentor
Mentor

Hi,

 

Before embarking on development, I have a question about whether it's possible.
I'm using an EntityJig to draw a polyline (with specific input options).

At the end, the polyline will have a DrawOverrule (+ SnapOverRule + GripOverrule) to be drawn as several offset polylines with symbols and hatchings (via XData attached to the object).
Is it possible to view the Overrule while the Jig is being drawn? Or do I have to manage the display of my graphics in my Jig, and then via the Overrule once the polyline has been added to the DB?

 

Thanks

Olivier Eckmann

EESignature

0 Likes
359 Views
2 Replies
Replies (2)
Message 2 of 3

ActivistInvestor
Mentor
Mentor

Overrules apply to all objects of the runtime class which the overrule is added to, regardless of what database they are in, or whether they are in any database (e.g., a newly-created object). However, it may also be possible that AutoCAD does not call Drawable overrules for objects that are being dragged using a Jig (for performance reasons). 

 

You can verify if that is the case or not by implementing a DrawableOverrule and adding it to the class of object that's being dragged by your jig, and seeing if the overrule's WorldDraw() method is called while dragging the object. If it is, then you can use the overrule to provide a custom graphical representation while dragging, with the caveat that any significant amount of work could result in significant 'lag' that would make dragging bog down to the point where it may not be a good option.

 

On way to minimize lag while dragging is to use the Editor's MouseHasMoved property to short-circuit the update and/or drawing processes. if this property returns true, it means there are unprocessed mouse move events in the event queue and your update/drawing code should stop drawing and return immediately

0 Likes
Message 3 of 3

O_Eckmann
Mentor
Mentor

OK, thanks, I'll have a try to test your recommendations.

 

Olivier Eckmann

EESignature

0 Likes