Hi Maxim,
I agree with Maury there are probably other better ways available how to implement similar functionality. But first of all I'd like to ask you to provide more details what do you want to achieve.
You should be aware VBA is bad choice if you want to implement any tight dynamic integration, especially because it's s very slow (macro is external to MicroStation process and anything represents many calls and marshalling to and from VBA world) and also API itself is limited. So if VBA is your the only choice (and it's not possible to use native code), it's about to choose the best of bad options.
If your intention is to display "running coordinates at cursor", in my opinion the possible options are:
- Because your code is based on IPrimitiveCommandEvents class, you can draw coordinates as a part of dynamic. I guess it's the most efficient way and you can draw anything you are able to create using MicroStation elements.
- As Maury mentioned, you can also use transient elements. Contrary to dynamic they are persistent.
- To use VBA form is in my opinion the worst option, because to redraw the form is by far slower than to draw MicroStation elements and also you have to work with screen coordinates, which require extra transformations. On the other hand, you don't have to calculate with zoom, because forms are defined in screen units.
With regards,
Jan