Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Jef_E
1443 Views, 5 Replies

AddIn event on document change

Hi!

 

I'm writing an addin that works with iProperties of the active document or the selected document. But I can't find the right event to trigger my code.

 

What I have now is 2 events,

 

first when the user selects an item (in assembly)  this works fine for me.

' Add event handler for user selected object event
m_UserInputEvent = m_inventorApplication.CommandManager.UserInputEvents
AddHandler m_UserInputEvent.OnSelect AddressOf OnDocumentChangeEvent

But I want also an event when the user changes document open or switches active document on the bottom with tabs.

' Add event handler for OnDocumentChange event.
m_AppEvents = m_inventorApplication.ApplicationEvents
AddHandler m_AppEvents.OnActivateDocument, AddressOf OnDocumentChangeEvent

This second event fires more than I like, on open document 2x and on other unwanted moments. What event can I use for this?

 



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2