Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I would like to fire code after edit iProperty in any document (part or assembly)
I'm trying to do it with the help of an event appevent.ondocumentchange, like below, but nothing to do.
Other events such as onSaveDocument or OnActivateDicument are working correctly
Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
m_inventorApplication = addInSiteObject.Application
AppEvents = m_inventorApplication.ApplicationEvents
AddHandler AppEvents.OnDocumentChange, AddressOf oDocEvents_OnAChange
GC.Collect()
End Sub
End Sub
Private Sub oDocEvents_OnAChange(ByVal DocumentObject As Inventor.Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Reason As Inventor.CommandTypesEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum)
MsgBox("Change")
End Sub
Private Sub oAssEvents_OnActive(ByVal DocumentObject As Inventor.Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles AppEvents.OnActivateDocument
If BeforeOrAfter = EventTimingEnum.kAfter Then
MsgBox("Active")
End If
End Sub
Thank's in advance for your help
Michal
Solved! Go to Solution.