Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic Code to Log In to Vault and Log out of Valut

7 REPLIES 7
Reply
Message 1 of 8
rthapa
1317 Views, 7 Replies

iLogic Code to Log In to Vault and Log out of Valut

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.

7 REPLIES 7
Message 2 of 8
minkd
in reply to: rthapa

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



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 3 of 8
Sophia911121
in reply to: minkd

I was wondering if there is a code that we could write to bring in parts from Vault into iLogic? Thank you!

 

Message 4 of 8
rthapa
in reply to: minkd

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
Message 5 of 8
pellerbrock
in reply to: rthapa

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?

Message 6 of 8
philip1009
in reply to: pellerbrock

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
Message 7 of 8
pellerbrock
in reply to: philip1009

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.

Message 8 of 8
philip1009
in reply to: pellerbrock

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?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report