ObjectARX

ObjectARX

Reply
Distinguished Contributor
maisoui
Posts: 131
Registered: ‎12-07-2009
Message 1 of 3 (347 Views)
Accepted Solution

How to draw a custom glyph near the AutoCAD crosshair cursor?

347 Views, 2 Replies
12-06-2012 02:56 AM

Hi,

 

I have complex custom entities and I'd like to implement advanced manipulation like grip points of Polyline. I'm looking for how to draw a custom glyph neer the AutoCAD crosshair cursor, like AutoCAD does when you convert a polyline segment to an arc or you add a vertex (look at the image below).

 

glyph_cursor.png

 

All suggestions are welcomed.

Best regards,

Jonathan

 

--
Jonathan
Moderator
Alexander.Rivilis
Posts: 1,406
Registered: ‎04-09-2008
Message 2 of 3 (341 Views)

Re: How to draw a custom glyph near the AutoCAD crosshair cursor?

12-06-2012 04:34 AM in reply to: maisoui

For example with help of AcEdInputPointMonitor::monitorInputPoint.

Using AcGiViewportDraw* drawContext parameter you can draw yours own graphics. 


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Distinguished Contributor
maisoui
Posts: 131
Registered: ‎12-07-2009
Message 3 of 3 (242 Views)

Re: How to draw a custom glyph near the AutoCAD crosshair cursor?

06-26-2013 11:35 PM in reply to: maisoui

Hi,

 

I was able to implement that I wanted by combining an AcEdInputPointMonitor and a Transient Entity. Have a look to sample AsdkTransientGraphicsSampFolder of OARX 2009. In method monitorInputPoint you have to update the position of the transient entity and that's it.

 

Note: If you use kAcGiDirectTopmost as drawing mode (when adding transient), entity will be drawn over grips.

 

I hope this will help somebody else.

Regards,

Jonathan

 

--
Jonathan
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.