Pausing macro for user to select elements

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?

Christmas May

Parents
  • 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.

    Unknown 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

  • Mr. Summers,

    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.

    Christmas May

Reply Children
No Data