Vault database login triggers OnActiveProjectChange
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Quick question:
I'm working on an VB.net Class Library addin that will call certain iLogic rules when certain events occur, under certain conditions.
One of the events is the EdmSecurity.EdmSignIn Event (from the Connectivity.InventorAddin.EdmAddin Class). I have currently used some pseudo code to test the defined events.
One odd thing: Logging into the Vault database not only triggers the code associated with the OnEdmSignIn Event, but also the OnActiveProjectChanged Event.
Even when documents are open (and I am manually unable to change the active project under any circumstances).
Private Sub InventorApplicationEvents_OnActiveProjectChanged(ProjectObject As DesignProject, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles InventorApplicationEvents.OnActiveProjectChanged
If (BeforeOrAfter = EventTimingEnum.kAfter) Then
MsgBox("@OnActiveProjectChanged")
End If
End Sub
Private Sub OnEdmSignIn(sender As Object, e As System.EventArgs) ' Event that involves logging (back) into a Vault database.
'ExternalRuleRunner.RunExternalRule("General\CheckActiveProject")
MsgBox("@OnEdmSignIn")
End Sub
An iLogic rule will now be called unnecessarily. No disaster, but it looks a bit sloppy. The user will not notice this. I'm now thinking of a comparison between a PreviousProjectName and a CurrentProjectName.
Is there another condition to think of to silence OnActiveProjectChanged when the EdmSignIn Event occurs?
Inventor 2023.5.1
René van der Starre