Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Display Prompts during workflows

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
349 Views, 1 Reply

Display Prompts during workflows

Hi,

 

When working with the Vault API I would like to get the prompts that comes with it. For instance when checking out a file (see the code below), I would expect a prompt to be displayed if for instance the  local file is newer than than the one in the vault and is about to be overwritten:

File '{0}' is NEWER than the data in the Vault. Are you sure you want to overwrite it?

 

 

VDF.Vault.Settings.AcquireFilesSettings settings = new VDF.Vault.Settings.AcquireFilesSettings(connection);
if (!file.IsCheckedOut)
{
settings.DefaultAcquisitionOption = VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Checkout;
settings.OptionsResolution.ForceOverwrite = false;
settings.AddEntityToAcquire(file);

VDF.Vault.Results.AcquireFilesResults results = connection.FileManager.AcquireFiles(settings);

}

 

Thanks....

1 REPLY 1
Message 2 of 2
smithmat
in reply to: Anonymous

You'll want to explore using either:

  • Autodesk.DataManagement.Client.Framework.Vault.Forms.Settings.InteractiveAcquireFileSettings or
  • Autodesk.DataManagement.Client.Framework.Vault.Forms.Settings.ProgressAcquireFilesSettings

 

Either of these can be passed to

  • Autodesk.DataManagement.Client.Framework.Vault.Forms.Library.AcquireFiles

Notice: the above AcquireFiles method is a different one than you are currently using.  The one you are currently using display no UI, while the ones above do display UI.

 

Using InteractiveAcquireFilesSettings will display the Get/Checkout dialog that you see in Vault.

Using the ProgressAcquireFilesSettings will not display that dialog, but will display other relevant UI (progress dialog, restriction dialogs, error dialogs).  I think this is the one you are looking for.

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

Post to forums  

Autodesk Design & Make Report