Customize the Data Standard MenuDefinitions.xml File

Add additional Data Standard menu items to the Vault Client interface or suppress certain commands with the MenuDefinitions.xml file.

Default Data Standard Menu Options

All Data Standard menu customization in the Vault Client is defined in the MenuDefinitions.xml file located at %programdata%\Autodesk\<Vault version>\Extensions\DataStandard\Vault.

Note: You must reset the Vault toolbars after restarting the Vault Client for the first time after Data Standard has been installed, or after modifiying theMenuDefinitions.xml file.

File Elements

The definition files are in XML format. Use a text editor or an XML editor to modify element values in the file.

The MenuDefinitions.xml file has three top level components:

Menu Items

At first each command has to be defined. That can be done with the MenuItem component.

Contains one or more <command name> elements.

<command name>–Unique name for the command. This name is used in a CommandSite component.

Sample for New Standard File

<MenuItem>
<NewTask Label="$UIString[MNU22]" Description="$UIString[MNU17]" Hint="$UIString[MNU18]"
PSFile="CreateCustomObject.ps1" Image="NewCustomObject.ico" ToolbarPaintStyle="TextAndGlyph"
NavigationTypes="Task" MultiSelectEnabled="False" />
<EditTask Label="$UIString[MNU21]" Description="$UIString[MNU19]" Hint="$UIString[MNU20]"
PSFile="EditCustomObject.ps1" Image="EditCustomObject.ico" ToolbarPaintStyle="TextAndGlyph"
NavigationTypes="Task" MultiSelectEnabled="False" />
<NewFile Label="$UIString[MNU1]" Description="$UIString[MNU11]" Hint="$UIString[MNU7]" PSFile="CreateFile.ps1"
Image="NewStandardFile.ico" ToolbarPaintStyle="TextAndGlyph" NavigationTypes="File,Folder"
MultiSelectEnabled="False" />
<EditFile Label="$UIString[MNU2]" Description="$UIString[MNU12]" Hint="$UIString[MNU8]" PSFile="EditFile.ps1"
Image="EditFileDatasheet.ico" ToolbarPaintStyle="TextAndGlyph" NavigationTypes="File"
MultiSelectEnabled="False" />
<NewFolder Label="$UIString[MNU3]" Description="$UIString[MNU13]" Hint="$UIString[MNU9]" PSFile="CreateFolder.ps1"
Image="NewStandardFolder.ico" ToolbarPaintStyle="TextAndGlyph" NavigationTypes="Folder"
MultiSelectEnabled="False" />
<EditFolder Label="$UIString[MNU4]" Description="$UIString[MNU14]" Hint="$UIString[MNU10]" PSFile="EditFolder.ps1"
Image="EditFolderDatasheet.ico" ToolbarPaintStyle="TextAndGlyph" NavigationTypes="Folder"
MultiSelectEnabled="False" />
<ShowLog Label="$UIString[MNU5]" Description="$UIString[MNU15]" Hint="$UIString[MNU5]" PSFile="ShowLog.ps1"
Image="Log.ico" ToolbarPaintStyle="TextAndGlyph" MultiSelectEnabled="False" />
<AboutDialog Label="$UIString[MNU6]" Description="$UIString[MNU16]" Hint="$UIString[MNU6]"
PSFile="ShowAboutDialog.ps1" Image="About.ico" ToolbarPaintStyle="TextAndGlyph"
MultiSelectEnabled="False" />
</MenuItem>

The available attributes for MenuItem <command name> element are shown in the following table.

Attribute

Required

Valid Values

Description

Label

Yes

Characters and Numbers

Text displayed in the menu.

Description

Yes

Characters and Numbers

Gives more information about what the command does.

Hint

Yes

Characters and Numbers

Text representing the tooltip or the command.

PSFile

Yes

PowerShell ps1 file name

Name of the PowerShell file that contains the script to execute when the menu command is invoked.

Image

No

Image should be 16x16 or 32x32

Name of the bitmap image for the menu command. The file has to be located in the same folder as the MenuDefinitions.xml.

ToolbarPaintStyle

No

Text, Glyph, and TextandGlyph

Controls how the command appears on a toolbar.

NavigationTypes

No

BOM, Change Order, File, FileVersion, Folder, Item, Other

Comma-separated list of object types for which this command is available.

MultiSelectEnabled

No

True or False

If false, the command is enabled only when a single item is selected.

Note: For the variables Description, Hint, and Label, the UI String syntax can be used. See Localization for more information.

Command Sites

Contains one or more <command site name> elements.

Specify through the command sites in which menu the defined menu commands appear. A command site can be defined with a site component.

Sample for file context menu:

<CommandSite>
<FileContext Label="myMenu" DeployAsPullDown="False" Location="FileContextMenu">
<Item Name="NewFile"></Item>
<Item Name="EditFile"></Item>
</FileContext>
<FolderContex Label="myMenu" DeployAsPullDown="False" Location="FolderContextMenu">
<Item Name="NewFile"></Item>
<Item Name="NewFolder"></Item>
<Item Name="EditFolder"></Item>
</FolderContex>
<StandardToolbar Label="myMenu" DeployAsPullDown="False" Location="StandardToolbar">
<Item Name="NewFile"></Item>
<Item Name="EditFile"></Item>
</StandardToolbar>
<ToolsMenu Label="myMenu" DeployAsPullDown="False" Location="ToolsMenu">
<Item Name="ShowLog"></Item>
</ToolsMenu>
<HelpMenu Label="myMenu" DeployAsPullDown="False" Location="HelpMenu">
<Item Name="AboutDialog"></Item>
</HelpMenu>
<Task Label="Task" DeployAsPullDown="False" Location="Task">
<Item Name="NewTask"></Item>
<Item Name="EditTask"></Item>
</Task>
</CommandSite>

The available attributes for CommandSite <command site name> element are shown in the following table.

Attribute

Required

Valid Values

Description

Label

No

Characters and Numbers

Text displayed in the pulldown menu. If it doesn’t exists then ‘mymenu’ is used.

DeployAsPullDown

No

True or False

If True, pull down menu is created on the context menu with label defined above.

Location

Yes

Characters and Numbers

Text representing the tooltip for the command.

The CommandSite element contains one or more <Item> which corresponds to the elements defined in the MenuItem elements.

The only attribute for the <Item> element is Name.

Attribute

Required

Valid Values

Description

Name

Yes

Name of the element defined in the MenuItem elements.

Name of the element defined in the MenuItem elements

Suppressed Menu Items

By default, the New Folder command is removed from the file and right-click menus when Data Standard is installed. Administrators can remove additional default commands from the Vault user interface by modifying the SuppressMenuItems section in the MenuDefinitions.xml file.

<SuppressMenuItems>
NewFolder,NewFolderGroupMenu,NewFolderGroupButton,NewFolderForContextMenus
</SuppressMenuItems>

The command names are separated by a comma.

Example: