Introduction to Revit 2011 API
イベント
イベントハンドラ関数、イベント登録と登録解除
§イベントハンドラ関数
§
§
§
§イベント登録
§
§
§
§イベント登録解除
§
§
§
public Result
OnStartup(UIControlledApplication application)
{
application.ControlledApplication.DocumentChanged
+= UILabs_DocumentChanged;
return Result.Succeeded;
}
public Result
OnShutdown(UIControlledApplication application)
{
application.ControlledApplication.DocumentChanged -=
UILabs_DocumentChanged;
return Result.Succeeded;
}
public void
UILabs_DocumentChanged(object sender, DocumentChangedEventArgs
args)
{
// Do something here
}