In C++ we can write system event handlers...
SystemCallback::SetUnloadProgramFunction (OnUnload); SystemCallback::SetReloadProgramFunction (OnReload); SystemCallback::SetNewDesignFileFunction (OnNewDesignFile);
Where, for example, my function OnNewDesignFile is called asynchronously by MicroStation when the user opens a new DGN file.
OnNewDesignFile
Are similar event observers available for .NET developers?
Perhaps MstnPlatformNET.Session has what you're looking for? e.g., OnMasterFileStart event.
Answer Verified By: Jon Summers
Hi Jon Summers,
In addition to Paul's recommendation, to retrieve a more/most complete list from the help (MstnPlatformNET or DgnPlatformNET) search for: EventHandler.
HTH,Bob
Robert Hook said:to retrieve a more/most complete list from the help (MstnPlatformNET or DgnPlatformNET) search for: EventHandler
While I was searching for an answer, I tried Event Handler (with a space), with no result. Searching for EventHandler reveals more, but doesn't include Paul's solution OnMasterFileStart. In other words, I would have had to guess exactly the word OnMasterFileStart to get the answer I wanted: Catch 22. The perfect search phrase is Session Events, which reveals eleven event handlers.
OnMasterFileStart
It doesn't help that the terminology differs from that used in either the MicroStationAPI (SetNewDesignFileFunction) or VBA (OnDesignFileOpened). How much more helpful would the help documentation be if it were to include a thesaurus so we could search for synonyms? That's a perfectly feasible suggestion: the SDK help manuals are all HTML Help. Microsoft's HTML Help tool enables an index of keywords, which enables fast lookup.
SetNewDesignFileFunction
OnDesignFileOpened
Regards, Jon Summers LA Solutions