The MicroStationAPI provides mdlSystem_getMdlAppClass/mdlSystem_setMdlAppClass that inform how the app was loaded (USER, DGNAPP, etc) in one of the MdlApplicationClass enum values.
mdlSystem_getMdlAppClass/mdlSystem_setMdlAppClass
MdlApplicationClass
I can't see a .NET equivalent in the MstnPlatformNET.
Hi Jon Summers,
Is there a specific behavior or goal you are trying to achieve? The .Managed MDL Addin runtime does not support near as many parallel behaviors the Native MDL runtime provides.
Thank you,Bob
Robert Hook said:Is there a specific behavior or goal you are trying to achieve?
An AddIn needs to know how it was started. If started as an MS_DGNAPPS, it must defer certain operations until the DGN file is loaded and its caches filled.
Regards, Jon Summers LA Solutions
If you need to determine if the MDL AddIn was loaded as a dgnapp then then you will need to either: call the MDL Native API using the loaded AddIn name, or query MS_DGNAPPS to produce a file list to test if loaded and match against.
If the AddIn (code) is your own I suggest adding your own AddIn Delegates, such as: MstnPlatformNET AddIn.NewDesignFileEventHandler and switching case on: AddIn.NewDesignFileEventArgs.When == AfterDesignFileOpen.
Please let me know if this help resolve the issue, need more information, or if I may have missed something in haste.
Thank you and HTH,Bob
Robert Hook said:If you need to determine if the MDL AddIn was loaded as a dgnapp
The question is about a .NET AddIn.
Robert Hook said:MstnPlatformNET AddIn.NewDesignFileEventHandler
Looks useful!