How to enable search bar in Vault file dialog using API?

How to enable search bar in Vault file dialog using API?

pranit_awale
Explorer Explorer
50 Views
2 Replies
Message 1 of 3

How to enable search bar in Vault file dialog using API?

pranit_awale
Explorer
Explorer

I’m using the Autodesk Vault API to open a file selection dialog, and the dialog itself is working fine. However, the search bar is not visible in the dialog.

Does anyone know how to enable or invoke the search bar in the Vault file dialog through the API?

Thanks in advance!
@Markus.Koechl

0 Likes
51 Views
2 Replies
Replies (2)
Message 2 of 3

Markus.Koechl
Autodesk
Autodesk

You can add the button using the extensibility options.

MarkusKoechl_0-1758180998164.png

Be aware that you need to implement all behavior and UI behind the button. In other words, there is no default "Search" dialog that you can raise.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 3

pranit_awale
Explorer
Explorer

try
{
var settings = new VdfForms.Settings.SelectEntitySettings
{
MultipleSelect = false,
};

settings.OptionsExtensibility.DoSearch = (entityClassIds, multiSelect, resultFunc) =>
{
var searchResults = new List<Vault.Currency.Entities.IEntity>();

resultFunc(searchResults);
};

// 2. Open dialog
var fileDialog = VdfForms.Library.SelectEntity(VaultConnection.connection, settings);

// 3. Get selected files
var files = fileDialog.SelectedEntities.OfType<FileIteration>().ToList();

if (files.Count == 0)
{
MessageBox.Show("No file selected.");
return null;
}

// 4. Download selected files
DownloadFiles(files);


}


I using the above mentioned approach but not getting search bar visible.

0 Likes