I am looking for a way to log out of vault from within Inventor using iLogic codes. I have created an iLogic rule that automates export an assembly drawing and all subcomponent drawings. In my code, I have suppressed all Inventor prompts but I do not have a way to supress Vault prompts. I can manually log off from vault and run this rule without any problems. However, if I forget to do so, I am stuck responding to update requests from vault and check out requests constantly for each and every file.
Does anyone have the iLogic code to log in and log out of vault? Anyother vault related codes to check in or check out files would also be much appreciated.
Unfortunately, I don't think the Inventor Vault add-in provides any kind of API that would allow a third party to drive it.
However, if you (or your customers) are using vault in combination with your tool; then you should probably be checking-out the files that your tool is modifying. If you simply log out of vault, you (or your customers) will likely experience an "edited out of turn" condition otherwise. If someone else has checked-out any of the same files, changes will likely be be lost when trying to reconcile that. See the Vault SDK help for details about the Vault API : from the Vault help, click on "Developer Tools".
-Dave
I was wondering if there is a code that we could write to bring in parts from Vault into iLogic? Thank you!
Below is the code we discovered that allow us to Log out of Vault when necessary. This code simply automates the action of manually clicking the >Vault>Logout command icon. The same can be done for any other command icon used in Inventor. The reason we use the Log Out command is to suppress any vault dialogues when we excecute an iLogic rule that exports the drawing of all related parts in an assembly to dwg, dxf and pdf formats. If someone knows of an easier way to suppress all vault dialogues using iLogic, it would be much appreciated if you could provide us the code.
ThisApplication.CommandManager.ControlDefinitions.Item("LogoutCmdIntName").Execute
Would anybody be able to expand on this, and give feedback on how to edit information in the Log-In screen (IE: Vault name), and automatically have it "click OK" at this point?
What is your purpose of logging out and into Vault? If the purpose is just to deactivate the pop-ups for the rest of your iLogic code, it's easier to just deactivate and then reactivate the add-in by code:
SyntaxEditor Code Snippet
oVault = ThisApplication.ApplicationAddIns.ItemById("{48B682BC-42E6-4953-84C5-3D253B52E77B}") oVault.Deactivate 'Run necessary code. oVault.Activate
Purpose: We have different vaults for different product lines, with different project files (don't ask why).
We have to switch back and forth, and many times the drafters forget to change Vaults, I figured I could add a quick utility for them to use into our custom tool palette.
I don't need to ask, it's perfectly understandable to have multiple projects and vaults, at a previous position, we had 2 separate vaults for the 2 separate manufacturing facilities. Unfortunately, the API in the Vault Add-In is either not exposed or not documented for programmers to easily peruse through. I'm not sure how that previous poster got a hold of that code to setup login info, hopefully he's still active on this forum and will reply back.
EDIT: Actually, I just had an idea, if the project file is linked to the Vault by name, then we can make some code to check if the user is using the correct project file. Would that work for you?