Here I am trying to run Selection.SetElementIds() after using the PostCommand() method but it seems as though the selection occurs before the PostCommand when I run the script.
I believe the cause for this can be found in the PostCommand method description:
Posts the command to the Revit message queue to be invoked when control returns from the current API context.
So it seems like there are 2 options:
- Add the Selection into the message queue along with the PostCommand
- Delay the Selection so the PostCommand runs first.
If you guys have any feedback or solutions I would greatly appreciate it!
Thank you in advance!