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\<Vault version>\Extensions\DataStandard\Vault\addinVault\Default.ps1
- C:\ProgramData\Autodesk\<Vault version>\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") }) }