Skip to main content

List all vault views using SOLIDWORKS PDM API

Vault views info printed to Console window{ width=250 }

This example demonstrates how to list all available vault views and their paths and prints the information to the console window.

IEdmVault8::GetVaultViews SOLIDWORKS PDM API is used to list the information about all available PDM vaults. Alternatively this information can be retrieved from the Registry.

using EPDM.Interop.epdm;
using System;

namespace CodeStack.ListPdmVaults
{
class Program
{
static void Main(string[] args)
{
var vault = new EdmVault5Class();
EdmViewInfo[] views;
vault.GetVaultViews(out views, false);

foreach (var view in views)
{
Console.WriteLine($"{view.mbsVaultName}:{view.mbsPath}");
}
}
}
}