How to Lock a 3D view via Dynamo (Toggle on or off)


I’m trying to get a script working to toggle the “Save view orientation” of an inputted view.
i.e. image attached. Setbuiltin parameter doesn’t seem to be working for me at the moment. Any ideas or suggestions.

Thank you very much.

Hello Tim,
you have to call this method to save and lock a 3d view
It is not a parameter to set :wink:

Are you looking for a code snippet or is this enough for you?

Thanks Fabio, yes code snippet would be great as I’m not super familiar with Revit API in Python @FabioDeAgostini

Here’s the dyn file, you will find the python:
lock3dview.dyn (5.6 KB)

1 Like


You can use the 3DView Lock or Unlock node in Genius Loci package.

1 Like

Great! Thanks for putting in the time to send the Python.

Thanks, good to know another custom node method @Alban_de_Chasteigner