Run External Command on Multiple Cloud Models

I am trying to run an external command on multiple models. I can use the Revit API to Open and run an External Command but the RevitAPI only allows for one external command per session. Any pointers on the best way to achieve this?

I have a list of DB.CloudPaths and would like to do the following:

  1. Open up the cloud model and “swallow” any warnings that pop up that would keep the model from fully opening.
  2. Run an External Command (external command synchronizes model to cloud)
  3. Exit Model / Revit session and proceed to the next DB.CloudPath

Technically the ‘external command’ is defered to after your script has run. And indeed there can only be 1 command waiting to happen after your script.

So your goal I think is to reduce the amount of external commands.to a single one.
Actually It’d be preferable if you don’t need a single one.

Because if you manage to do that, you can perhaps leverage pyrevit-cli’s api.
It should allow you to open models and run a script on them. (Typically you don’t need an external command for model synchronization IF your model has already been set up on the cloud of course).

Now the real challenge is possibly opening these models from a cloud path.(I honestly don’t know but if feel free to share your findings here, i’m also interested in that use-case)