InitializeWindow 函数在 Data Standard 窗口打开之前执行。在该函数中,可以预定义变量,订阅事件,或者自定义窗口外观。
从 Vault Client 以及 Inventor 和 AutoCAD 附加模块调用。该函数是必备函数,不能删除。
下列位置提供了默认实现:
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")
})
}