iLogic (OnSaveEvent) in combination with Vault API from wihtin Inventor add-in

iLogic (OnSaveEvent) in combination with Vault API from wihtin Inventor add-in

psaarloos
Collaborator Collaborator
385 Views
1 Reply
Message 1 of 2

iLogic (OnSaveEvent) in combination with Vault API from wihtin Inventor add-in

psaarloos
Collaborator
Collaborator

Dear all,

 

I have an Inventor add-in which uses the Vault API to AcquireFiles. The model which is downloaded and checked out from Vault has been modified in Vault. Because of that the AcquireFiles method of the Vault API is updating the references in the local files. This is normal behavior, but it seems the OnSaveDocument event is triggered as well during this process. The documents of which the references are updated seem to be opened 'hidden' in Inventor during the AcquireFiles process.

 

The model contains iLogic code which is triggered through Event Triggers within the document(s). Is there a way to get to know a document is opened 'hidden'? What should I add to my iLogic code to ensure the AcquireFiles process will not trigger any iLogic rules by the OnSaveDocument event?

 

Thanks in advance for your help! 

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
386 Views
1 Reply
Reply (1)
Message 2 of 2

chandra.shekar.g
Autodesk Support
Autodesk Support

@psaarloos,

 

Hoping that below changes in iLogic would help to avoid run rule on saving event.

 

Sub Main()
	Try	
		Dim doc = ThisDoc.Document
		'Run your rule on Saving Document
	Catch 
		Exit Sub 
	End Try
End Sub

For more understanding, can you please share reproducible steps and iLogic code which triggers OnSaveEvent?

 

Please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes