Example--Adding a Field to a Data Standard Dialog
Add a property called Company to the Data Standard for Vault dialog.
- Open File.XAML (C:\ProgramData\Autodesk\Vault 2016\Extensions\DataStandard\Vault\Configuration) as a link in Visual Studio.
- Go to the Grid where you want to add the control
- Add a
RowDefinition
in the list of <Grid.RowDefinitions>
. Set the height to 'auto' so that the row adjusts to be as high as the control requires.
- Locate where the other controls are defined. Add a Label and a TextBox. Where these controls are place is not relevant. The row attribute defines where the control is displayed in the dialog. However, Autodesk recommends that you keep the sort order of the controls, so it becomes easier to find them later.
- Set the Content attribute for the label to the text that want to display in the dialog (e.g., Company Name). Bind the Text attribute to the property Company like this:
Test={Binding Prop[Company].Value}
- Set the
Grid.Row
and Grid.Column
attributes to the column and row where the control is displayed
- You may have to update the
Grid.Row
and Grid.Column
attributes of the other controls so that they show up in the right location and do not overlap your controls.
- Save the file and create a new file in Vault. The dialog should now show the new property
The same operation can be applied to any other dialog. In case of the CAD dialogs, just keep in mind to also define the property in the according CFG file and to restart the CAD application so that the property is loaded.