Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

GUI Interface to search Vault and open Inventor .idw

Formsprag
Advocate

GUI Interface to search Vault and open Inventor .idw

Formsprag
Advocate
Advocate

Good morning Forum,

 

I asked the question over on the Vault Customization Forum last week and was directed back to using the iLogic Forms. I need this GUI Interface to be independent from Vault/Inventor but drive both of them. Just thought I would post here to see if anyone has any ideas.

 

Thanks, 

 

Is there any way to use a GUI Interface to search files in Vault and open them in Inventor?

 

I have a list of six variables that I would like to implement to search vault and open the appropriate file in Inventor. 

 

2020-08-21_14-11-18.jpg 

 

File names in Vault will be as follows:

 

2020-08-21_14-17-27.jpg

 

The reason I ask is these six questions will result one of 512 unique files.

 

Thanks,

 

Vault 2020.2

Inventor 2020.3.1

0 Likes
Reply
394 Views
3 Replies
Replies (3)

yan.gauthier
Advocate
Advocate

in an independent .exe app ?

 

you can create a VDF.Vault.Currency.Connections.Connection object,

 

Create a search condition using your parameters and then find the file using 

 

connection.WebServiceManager.DocumentService.FindFilesBySearchConditions

 

Check if file version matches local version (if there is) otherwise, get the file.

 

Marshal to your inventor application and open the file

 

Is it what you have in mind ?

0 Likes

Formsprag
Advocate
Advocate

Yes, an independent .exe or app would be perfect.

 

I was thinking by answering the six variables it would link you to the corresponding file in vault and open it as read only in Inventor. Linking the .exe or app to vault is where I get lost. Any ideas?

0 Likes

yan.gauthier
Advocate
Advocate

you don't need to link to vault, you can simply create a connection to the vault server.

using Autodesk.Connectivity.WebServicesTools;

 ServerIdentities server = new ServerIdentities();
            server.DataServer = "000.000.000.000"; //Server Address
            server.FileServer = "000.000.000.000"; //Server Address
            UserPasswordCredentials login = new UserPasswordCredentials(server, "Vault", "Administrator", "", true); //True for ReadOnly
            
            using (WebServiceManager serviceManager = new WebServiceManager(login))
            {
                Folder root = serviceManager.DocumentService.GetFolderRoot();
                //Find latest version of the file in the vault
                Autodesk.Connectivity.WebServices.File[] file = serviceManager.DocumentService.FindFilesBySearchConditions();
            }

 

Otherwise, this method should also work

 

using VDF = Autodesk.DataManagement.Client.Framework;

            VDF.Vault.Results.LogInResult logInResult = VDF.Vault.Library.ConnectionManager.LogIn
                (
                    //Server,
                    //VaultName,
                   //UserName,
                    //Password,
                    VDF.Vault.Currency.Connections.AuthenticationFlags.Standard,
                    null
                );

if (logInResult.Success)
            {
                VDF.Vault.Currency.Connections.Connection connection = logInResult.Connection;
                Autodesk.Connectivity.WebServices.File[] file = connection.WebServiceManager.DocumentService.FindFilesBySearchConditions();

            }