Detect Hover Event

Detect Hover Event

mark_thompsonH72ZG
Observer Observer
589 Views
4 Replies
Message 1 of 5

Detect Hover Event

mark_thompsonH72ZG
Observer
Observer

I wish to be able to detect if the current event from AutoCAD is a Hover event so I can then determine whether I need to refresh something in our code. At the moment we are refreshing it every time the mouse even moves so if I could trap hover as a state then I could make sure we don't do the refresh under those cicumstances to speed things up.

 

Any help would be much appreciated.

 

Thanks

 

Mark Thompson

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

tbrammer
Advisor
Advisor

Have a look at the classes AcEdInputPointManager and AcEdInputPointMonitor.

I don't think that there are methods to detect hovering. But you should be able to detect "relevant mousemoves".


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 3 of 5

mark_thompsonH72ZG
Observer
Observer
Hi.
Thanks for the prompt reply. I have realised that I did not really give enough information in my original question. My apologies. I’ll include the extra details below but please let me know if I should instead post a new question on the forum.
What I am really trying to find out when AutoCAD is asking for properties of an object, the reason for that - whether it's for the properties window or some other reason, one of which could be hovering the object.
Thanks
Mark

0 Likes
Message 4 of 5

tbrammer
Advisor
Advisor

What kind of objects are we talking about? Custom entities that you implemented?

Every change in an AcDbObject/AcDbEntity should be preceded by a call to

object->assertWriteEnabled(). This notifies AutoCAD that the object will be changed and updates must be executed after object->close() and that  AcDbDatabaseReactor::objectModified() reactor messages must be send. I would say that this is also the moment when AutoCAD "asks for properties" to update things like the property window.

If you want to react to changes in an AcDbObject you might want to derive your own AcDbDatabaseReactor class and implement MyDbReactor::objectModified()


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 5 of 5

daniel_cadext
Advisor
Advisor

maybe AcDbHighlightOverrule or AcDbHighlightStateOverrule?

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