For our batch update, I'm using the builtin commands within an Inventor addin. I manually set appropriate default prompt responses, select the correct project and log into vault before executing.
Application application = ... inventor application ...;
application.SilentOperation = true;
application.ScreenUpdating = false;
// cannot disable user interaction otherwise check in/out will not work
NameValueMap fileOpenOptions = application.TransientObjects.CreateNameValueMap();
fileOpenOptions.Add("FileVersionOption", FileVersionEnum.kOpenCurrentVersion);
// must open visibly for check in/out to work
// they also fail if we add a view after opening invisibly
string documentName = "...full path to document...";
Document document = application.Documents.OpenWithOptions(documentName, fileOpenOptions, true);
if(new FileInfo(documentName).IsReadOnly)
application.CommandManager.ControlDefinitions["VaultCheckoutTop"].Execute2(true);
// ... make changes ...
application.CommandManager.ControlDefinitions["VaultCheckinTop"].Execute2(true);
// if you want to use document again, find it in application.Documents because our handle was invalidated by the check in (I also do this after check out, just to be sure)
application.SilentOperation = false;
application.ScreenUpdating = true;
View view = application.ActiveView;
if(view!=null) view.Update();
I did try using the Vault API and was able to use the EdmSecurity object to share the Inventor login to Vault and could check out a file. After considering the check in process, I decided it was too complex for our current requirements - dealing with file references (including iParts and iAssemblies), checksums, updating properties, loading file contents and generating visualisation files.
Use a program like TansuTCP to intercept the standard Inventor communication with Vault. While some of the traffic appears to be unnecessary (repetitive), it gives an idea of what might be required.
Regards,
cadull