ObjectARX

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

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

308 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,346
Registered: ‎04-09-2008
Message 2 of 3 (302 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: 109
Registered: ‎12-07-2009
Message 3 of 3 (203 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community