I would like to have a command button on a user form. Once the user clicks the button I want them to select some entities. For now I would like to count the number of entities they have selected. What code pauses the macro or stops the macro to allow the user to select the entities?
Write a class that Implements ILocateCommandEvents. That will let a user pick elements. You can check each element and verify that it passes whatever criteria you want (e.g. user can select only area objects). For each valid element, add it to the selection set.
Christmas050873 said:What code pauses the macro?
When you start a primitive command (using ILocateCommandEvents) then the user experiences the same datapoint->action that any built-in command provides. You, as a programmer, don't have to do anything.
The hardest part is sending data back to your UserForm, if that's what you want to do. This example may help.
Regards, Jon Summers LA Solutions
The other option would be to have the user hitt a button on the form when they are FINISHED selecting the elements.
Thanks, I was seeking confirmation that the primitive ILocateCommandEvents was how Microstation Intended this to be done. Never expected the example, but this too can't hurt anything . . . so thanks twice.