My project never requires the user to check out a part that my iLogic rules place and assemble. Is there a line of code I can place in a rule that will click the 'no to all' button when prompted to save the user from doing this every single time?
There is no direct way of doing this. But you could disable the vault addin at the start of your rule and restart it again at the end of the rule.
ThisApplication.ApplicationAddIns.ItemById("{vault addin 'ClientId' here}").Deactivate()
' Your code here
ThisApplication.ApplicationAddIns.ItemById("{vault addin 'ClientId' here}").Activate()
The biggest issue is that I can tell you the "ClientId" of the vault addin. (Just because I don't have the vault installed on this computer.) But you could use the following rule to get the addin name and the "ClientId" of each addin. (They are written to the iLogic log)
For Each addin As ApplicationAddIn In ThisApplication.ApplicationAddIns
If addin.AddInType = ApplicationAddInTypeEnum.kTranslationApplicationAddIn Then Continue For
logger.Info(addin.DisplayName & " - " & addin.ClientId)
Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com
One word of caution when disabling and re-enabling Vault, if you do it repeatedly for a batch process that can lead to crashes or the Vault addin not being fully loaded. I'm hoping Autodesk will add support for bypassing or temporarily disabling those prompts in the future.
Can't find what you're looking for? Ask the community or share your knowledge.