Dear All,
I need to checkout and checkin files(iam/ipt/idw) along with references in inventor.
I have tried using the Vault API to checkOut and checkIn but the references are lost and its not getting checkout to the working folder by default.
How can i get this done using inventor using comething like this below
m_inventorApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(True)
My current plan.
Step 1: CheckOut files to its working folder (Not achieved using Inventor API)
Step 2: open the file in Inventor (Can be done using Inventor API)
Step 3; CheckIn the opened file (Can be done using m_inventorApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(True))
Any help/ideas
Regards
Could you please look at this blog article published by Wayne Brill:
http://adndevblog.typepad.com/manufacturing/2013/06/checkout-checkin-a-file-in-vault-2014.html
Here is the discussion that led to this blog post
cheers,
Santosh
I am going through this process at the moment.
I have developed a GUI which uses both VAULT API and Inventor API functionality.
The VAULT API breaks any links between the iam, ipt and idw files. I use the vault API to check out only.
To check in the files i am opening the IDW files and using the m_inventorApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute(). This checks in associated parts and assemblies. Not sure the differences between execute() and execute2().
I am having a inconsistant results. If I manually open the drawing prior to running my GUI and just select my button that issues the VaultCheckInTop command it all is fine. The associated iam, ipt and the idw file all check in to vault OK.
if i use my code to search through vault to identify the drawing, open the drawing through my code from the working directory and then issue the VaultCheckInTop command only the iam and ipt files get checked in. The drawing opens but does not get checked in. I am trying to understand why as i type. It appears to be something to do with opening the drawing using the API rather than directly from inventor.
have you progressed with your development ?
regards
Wayne
In order to use the Inventor Vault addin commands, the document must have been opened visibly and be the active document. It is not sufficient to make the document visible after opening invisibly. To open a document I use code similar to:
string filename = "... full path to file ..." NameValueMap fileOpenOptions = Application.TransientObjects.CreateNameValueMap(); fileOpenOptions.Add("FileVersionOption", FileVersionEnum.kOpenCurrentVersion); fileOpenOptions.Add("DesignViewRepresentation", ""); // omit for idw Document document = Application.Documents.OpenWithOptions(filename, fileOpenOptions, true);
if(Application.ActiveDocument!=document) document.Activate();
I also find it helpful to execute a "VaultRefresh" command before the check in, as there can be a discrepancy between which files Inventor and the Vault addin believe need saving.
Regards,
cadull
My experience is more with iPart and iAssembly files rather than drawings, so you may be encountering issues that I haven't yet. At first I thought it would take a few days to write a batch utility to update our files ... this turned into 3 or 4 months.
I would check the Document.Dirty flag in all referenced documents, ensuring that all documents are saved (according to Inventor). The VaultRefresh command should get the Vault addin to agree with this status. You will need to decide what to do if a file needs saving but is not checked out to the user.
It can be worth checking for files that have been modified and saved without checking out. I also check for files that have a newer version in Vault.
Regards,
cadull
All
ensuring the document is active rather than just opened seems to have resolved my issues.
I need to do more testing to ensure it works every time but thanks for the tip.
regards
Wayne