I created a VBA macro (Microstation V8), which runs like AccruDraw.It provides, for each mouse movement, the XYZ position of cursor and its projection in a DTM with a change in background color of the control TextBox according this position (green means bottom of DTM , red above DTM).I use the IPrimitiveCommandEvents specifically IPrimitiveCommandEvents_Dynamics.This works fine but the macro stops when I run an external command: set/place cells, draw poly3D, delete entity, ....I want the macro continues to run regardless of the manipulation of the user like AccuDraw.
Hi,
You used an I-Primitive-Command. This behaves just like a primitive command. The move command stops when you start a trim command.
I have not looked into this, but if you want something to stay up through other commands, perhaps you need a non-modal dialog box.
--Robert
There can only be one active command at a time. Once you queue another command the current one will stop. To do what you want you need to look at MDL and the mdlLocate_setFunction callbacks. You can then get into the flyover as an element is located.
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Hi Robert,
the dialog box used is non-modal. The macro works fine, when I interact with keyboard (command keyIn) or when I click on draw windows. But it stops running when I try to draw a line or put a cell by Invoking a new command.
The dialog box stays on screen but the code behind doesn't work.
You have made command, so if there is another one command executed, previous must be exited.
Consider following macro which uses MDL expressions:
' Start it using: BeginViewMotionTest' End it using: EndViewMotionTest
Hi Dan,
Thank a lot for your reply. I tried your code and it works very well. This is what I needed
Thanks.