Draw highlighted line using a DrawJig

Draw highlighted line using a DrawJig

fehrsZBFB9
Advocate Advocate
311 Views
4 Replies
Message 1 of 5

Draw highlighted line using a DrawJig

fehrsZBFB9
Advocate
Advocate

Hallo Guys,

 

I've implemented a DrawJig which draws a line in its ViewportDraw-Method. I want this line to be highlighted. Is this possible?

 

I got it working with but I would like to use the Jig to do it. Is this possible?

 

TransientManager.CurrentTransientManager.AddTransient(
   line,
   TransientDrawingMode.Highlight,
   128,
   viewportIds
);

0 Likes
312 Views
4 Replies
Replies (4)
Message 2 of 5

ActivistInvestor
Mentor
Mentor

In your previous post, you said you wanted the line to look like a rubber-band. 

 

Please clarify, do you mean a rubber-band cursor or a highlighted entity?  In general, a rubber-band cursor is drawn the way AutoCAD draws them for most operations that involve dragging from a base point.

 

You say that the basepoint is constantly changing, which is fine in some specialized use-cases. You can set the BasePoint in each call to the Sampler() override to whatever you want, but in my own uses of Jigs, where the basepoint is not fixed, I just use a CursorType of RubberBand to draw a rubber-band cursor from the basepoint to the current cursor position.

 

In the clip below, the JigPromptPointOptions.BasePoint property is continuously updated on each call to Sampler() to be at the closest point on a curve to the current cursor position. 

 

acad_N3EClSvPXl.gif

Message 3 of 5

daniel_cadext
Advisor
Advisor

Blue command line?

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 4 of 5

ActivistInvestor
Mentor
Mentor

My command line has been that way for as long as it's been configurable.😎

Message 5 of 5

fehrsZBFB9
Advocate
Advocate

Hi. I'm talking about highlighting NON-Database resident Curves. The highlighted curve is the nearest to the current cursor position, so it's changing. I currently use a TransientManager to do so but if I have the DrawJig-Method anyway I thought it could be possible doing it there. But I haven't found any options. I assume the highlighting effect is applied later and not through World- or ViewportDraw.
I think I could use an EntityJig but it takes only ONE-Entity on construction. It is not possible to switch it later.

0 Likes