ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Grip Colors and AcDbGripData::setWorldDraw

4 REPLIES 4
Reply
Message 1 of 5
renencon
638 Views, 4 Replies

Grip Colors and AcDbGripData::setWorldDraw

Hi,

 

Within the callback function set by AcDbGripData::setWorldDraw you can draw the glyph for a custom grip.

 

If you do not set colors the default grip colors set at the AutoCAD's options dialog are used except GRIPCONTOUR color.

 

For example lets say I draw a small filled rectangle for the grip. I first use

pWd->subEntityTraits().setFillType(kAcGiFillAlways); to enable filled graphics and then I draw a polygon geometry using pWd->geometry().polygon(4,pts); however the resulting grip that way is filled with that grip color from the options dialog and the same color is used for its boundary line as well.

 

How can you use GRIPCONTOUR color for the boundary line of the grip?

 

Thanks

Anastassios

 

 

 

 

4 REPLIES 4
Message 2 of 5

Draw the boundary line once more with polyline method after filling.

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 3 of 5

Not possible the polyline will also be drawn with GRIPCOLOR not GRIPCONTOUR.

You need access to the value of GRIPCONTOUR set it with pWd->subEntityTraits().setColor(GRIPCONTOUR VALUE); and then draw the polyline or polygon as you suggested a second time.

But how do you get access to the GRIPCONTOUR value from within worlddraw callback function?

 

Thanks

Anastassios

Message 4 of 5

Yes, you must set color and other properties before using polyline method.

I do not use GRIPCONTOUR color, I draw with my own value. You can prepare the value of GRIPCONTOUR system variable beforehand and store it in some global variable if acedGetVar is impossible inside grip callback function.

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 5 of 5
maisoui
in reply to: NikolayPoleshchuk

Hi,

 

Interesting post. Maybe, this will help (list of vars for grips colors with default values) :

 

acad_grips_color.png

 

Regards,

Jonathan

 

--
Jonathan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost