Hello,
I've written an Addin (or I should say using modified Addin Jan Slegr had written...very nice, by the way) and I'm wondering if there is some way I can capture load and unload events of native forms or forms from other Addins? I wrote a plug in for Promis.e and was able to add form opening and closing event using the eventcenter in their ECT.ECAD.API dll and I was wondering if there was some equivalent in the Bentley.MicroStation.AddIn Namespace?
Thanks Dave
Hi Dave,
I think it's not possible. You can create modal dialog events handler using addin COM API, but it's about modal dialogs only.
VBA/COM API is limited in V8i and does not allow full integration with MicroStation. Even more, addin API is usually (not specifically in MicroStation) designed to run isolated without interaction with other loaded addins. Such approach is in parallel with general NET security philosophy.
Maybe it can be implemented using MDL native C code, but I'd like to ask why you need to monitr the dialog open event, especially if you want to monitor MicroStation dialogs and dialogs of other applications?
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Please reveal the version of MicroStation!
Regards, Jon Summers LA Solutions
Unknown said: I was interested in getting some of the promis.e form events
Tools to monitor or access promis.e events have to be published by promis.e API itself. From this perspective, MicroStation API allows to access "basic platform" features and events.
In my opinion the idea to hook a form events is not good and leads to fragile code. If an application is well and properly developed, its GUI is only view to business (internal) data. There should be a way how to monitor data events, not form events.
Unknown said:so that I could monitor what symbols are being inserted
I don't know how promis.e is integrated into MicroStation and how it works, so I am not sure what does it mean "to be inserted". But if you want to monitor how active model is modified, you can use ElementChanged Event. See VBA help for more details. But this feature is still limited and the only way how to get maximum "monitoring functionality" is to use native C/C++ code.