Activate the vault check in box hidden and pass predifined options?

Activate the vault check in box hidden and pass predifined options?

Anonymous
Not applicable
1,682 Views
8 Replies
Message 1 of 9

Activate the vault check in box hidden and pass predifined options?

Anonymous
Not applicable

Im working on a program that checks out syncronizes some data with our erp system and then checkes in the files again to vault. all works fine but in vault all links to other files are gone? when i checkin the files from inventor manuel then the links are ok in vault. therefore i wonder if it is possible to run the vault checkin dialog "hidden" and just pass in some predifined options and checkin to vault.

 

Please help.

 

Kent boettger. 

0 Likes
Accepted solutions (2)
1,683 Views
8 Replies
Replies (8)
Message 2 of 9

jdkriek
Advisor
Advisor
Accepted solution

Yes, and the Vault SDK has several examples - all add-ins or stand-alone programs though.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 3 of 9

Anonymous
Not applicable

I looked on the samples and i cant find anywhere where this i used in the vb.net vault sdk samples. can you please point one out where it is used?

 

Regards Kent boettger

0 Likes
Message 4 of 9

jdkriek
Advisor
Advisor

All the Vault SDK samples, for example HelloWorldVB.sln have a solution for logging into Vault through the script.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 5 of 9

cadull_rb
Advocate
Advocate

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

0 Likes
Message 6 of 9

jdkriek
Advisor
Advisor

@cadull_rb wrote:

 

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.

 


Agreed. Fiddler is also great for this and you can filter what you don't need out.

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 7 of 9

Anonymous
Not applicable

thanks for your help so fare, but there are some issues here i cant solve please help.

 

See attached document.

 

Regards Kent boettger.

0 Likes
Message 8 of 9

cadull_rb
Advocate
Advocate
Accepted solution

The check in dialog can be suppressed through the Vault Options in Inventor, but not through the Inventor API and it is not possible to supply a comment. An alternative would be to leave the dialog visible and use the Windows API to enter a comment and accept the dialog. The Visual Studio tool Spy++ is useful for identifying the properties of the dialog, then use commands like FindWindow http://msdn.microsoft.com/en-us/library/windows/desktop/ms633499(v=vs.85).aspx and SetDlgItemText http://msdn.microsoft.com/en-us/library/windows/desktop/ms645521(v=vs.85).aspx.

 

Regards,

cadull

0 Likes
Message 9 of 9

Anonymous
Not applicable

Thanks for you help on this, cadull_rb.

It looks like i have to go for your solution to suppress the dialog in the vault options. An leave out the comment for now?

The Spy++ seems to be part of visualstudio 2012 and i am running 2010?

Regards kent boettger.

0 Likes