Invoking Revit commands

Hi All,
Is it possible to open a revit file and invoke a set of commands?

eg. Open a family, hide the reference planes/lines, set the 3D view and then a Zoom fit?

If so i could batch process a number of family files and have a much bigger image to view rather than what is available now with a very small family image and the reference planes taking up the explorer view image…all you can view are the ref.planes!

It’s doesn’t seem good Revit practice how family creators leave the image for others to figure out what the image is unless they have good Naming Conventions at hand.

Let’s know if this can be done folks. Maybe Python is the better choice?


Background opening and closing multiple files sounds like the Orchid package. There’s a good number of threads regarding different workflows with this package.

As far as I know (since I couldn’t get Orchid to work due to some dependency issues in the past), you should be able to do most things Dynamo has normal access to within the background file. I am not sure if this includes postable commands.

This post suggests there are limitations, but that was back in '18. @john_pierson ?

there are definitely still limitations based on how dynamo works. Dynamo was made to work on the current file primarily. The background opening of documents offers some flexibility for this, but it is not a fail safe solution.

For more information on why I think background document workarounds are not the best way to do these things, check out this issue that remains unsolved.

1 Like

You might be able to do some of these things using P.I.G, assuming this is done with the thumbnail in mind.