Client graphics update + ActiveView.Update interferes with InteractionEvents

Client graphics update + ActiveView.Update interferes with InteractionEvents

codereclaimers
Enthusiast Enthusiast
306 Views
0 Replies
Message 1 of 1

Client graphics update + ActiveView.Update interferes with InteractionEvents

codereclaimers
Enthusiast
Enthusiast

Hi folks,

 

I have an addin which uses client graphics to display representations of data that persists between invocation of individual tools inside the addin.  Some of these tools create an InteractionEvents to allow the user to select objects in the active document, and as long as I don't update the client graphics this works as expected.

 

However, sometimes it is necessary to update the client graphics while the interaction is active (usually this update is just modifying a node's transform, but sometimes changing the coordinate/index sets associated with a node).  Whenever I update a client graphics node and then call Application.ActiveView.Update(), the view no longer shows any selection I have made, and my OnSelect/OnUnSelect handlers no longer get called when I attempt to select objects in the document.

 

The InteractionEvents and client graphics objects are created in different threads (neither of which is the main thread), in case that matters.  The ActiveView.Update() call occurs in the same thread that created the client graphics.

 

Thanks for your time,

Alan

 

*Edited to add*: The relevant code is in C#, in case that is relevant.  Also, this behavior appears to be the same in Inventor 2014 and 2017.

0 Likes
307 Views
0 Replies
Replies (0)