Share

InitializeWindow Function for Data Standard

The InitializeWindow function is executed before a DataStandard window opens. In this function, variables can be predefined, events can be subscribed, or the window appearance can be customized.

Usage

Called from the Vault client and Inventor and AutoCAD add-ins. The function is mandatory and cannot be removed.

A default implementation is available in:

  • C:\ProgramData\Autodesk\\Extensions\DataStandard\Vault\addinVault\Default.ps1
  • C:\ProgramData\Autodesk\\Extensions\DataStandard\CAD\addins\Default.ps1

Example

 function InitializeWindow
{
    # define the windows size
    $dsWindow.Width = 500
    $dsWindow.Height = 600
  
    # subscribe to the "Click" event of the OK button
    $dsWindow.FindName("buttonok").add_Click(
    {
        [System.Windows.Forms.MessageBox]::Show("ok-button-clicked")
    })
}

Was this information helpful?