Data Standard Custom Tabs

The Data Standard custom tab represents a XAML file to extend a tab in Vault. The type of dialog is System.Windows.Controls.UserControl and can be accessed in PowerShell using the variable $dsWindow.

Custom Tabs in Data Standard for Vault

XAML definitions for each entity type which uses a Data Standard dialog custom tab are located in these directories:

%programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault\Configuration\Task

%programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault\Configuration\Eco

%programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault\Configuration\File

%programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault\Configuration\Folder

%programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault\Configuration\Item

Every XAML file in these folders represents a custom tab that is added on Vault startup to the existing tab controls (e.g., History, Uses, Where Used and so on for files, Reports and Datasheet for folders, etc.).

Note: To show custom tabs for your own custom object type, create a separate folder with the name of custom object. See Custom Objects for more information.

Create a Data Standard Custom Tab

To add your own Custom Tabs to Vault, copy the folder (e.g. File if your custom tab is used for files) to the Vault.Custom\Customization\ folder.

The excerpt below shows the typical header of a XAML file for a tab. You can see that controls like TextBox and Label have default settings. For example, all TextBox controls are set to read only, meaning that the data in the tab is displayed but cannot be edited. Another default setting is the ScrollViewer, which makes tabs scrollable if the window is too small. The starting point for the layout is the <Grid> section.

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:behaviours="clr-namespace:Common.Wpf;assembly=Common"
             behaviours:TabTitleBehavior.TabTitle="$UIString[LBL36]"
            x:Name="MainWindow">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
            <Setter Property="IsReadOnly" Value="True" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="Background" Value="#F0F0F0" />
            <Setter Property="Margin" Value="0,5,0,5" />
        </Style>
        <Style TargetType="{x:Type Label}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Value="{x:Null}">
                    <Setter Property="BorderThickness" Value="1"></Setter>
                    <Setter Property="BorderBrush" Value="#ff0000"></Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
        <Grid>

Reference

The following objects are available in the Data Standard Custom Tab ps1 file:
  • $dsDiag
  • $dsWindow
  • $vault
  • $vaultApplication
  • $vaultConnection
  • Every ps1 file located in the Addins folder is read and used for the tabs. So all of the code present in the ps1 files located in the Addins folder defines the behaviour of the tab.