If you want to set title properties before the Data Standard Dialog first displays, you can add code within the InitializeWindow
function.
Set the value of the property you are looking for with the desired.
function InitializeWindow
{
$Prop["Title"].Value = "my title"
}
If you want to set a property title only for the file dialog and not for other dialogs, such as folder or custom object, specify the dialog name of the $dsWindow
.
function InitializeWindow
{
if ($dswindow.name--eq-"filewindow")
{
$Prop["Title"].Value = "my title"
}
}
If you want to set a title property only when a new data standard file is created, but not when one is edited, specify the create object in your code.
The object names are different, depending on whether you are creating a new Data Standard file with the vault-client or with AutoCAD or Inventor.
function InitializeWindow
{
if ($Prop["_CreateMode"].Value -eq $true)
{
$Prop["Title"].Value = "my title"
}
}
function InitializeWindow
{
$dialogName = $dsWindow.DataContext.GetType().Name
if($dialogname--eq-"createfileviewmodel")
{
$Prop["Title"].Value = "my title"
}
}