Autosave before opening dynamo?

Hi,

Is it possible to force Revit to autosave before opening Dynamo?

Put a save node before in your script ? but impossible before opening dynamo windows…

I would suggest a better solution would be to have a informative dialog box appear in a similar way to the one in the below video from @Paolo_Emilio_Serra1 .

You could use the dialog box to inform the person that is running the script that they need to save the files before they continue.

Thanks for the suggestions :slight_smile:
I’m looking for a solution where it will autosave before opening Dynamo… not a solution for a specific script.
It may not be possible, but thats unfortunately what I’m looking for… :frowning:

I would suggest you maybe look at creating a Dynamo Extension, though this may not work when you launch a script from dynamo player.

This is because dynamo is launched differently when you run from dynamo, this is why that popup solution should help you overcome both possibilities of users not saving a revit file prior to running.

Though maybe someone in the dynamo team could correct me if i am wrong.

Build an add-in that first saves your graph, then runs the command to launch Dynamo.

Remember that add-in will have to be tested and reconfigured against ever other add-in you ever install for ever version of Revit from now until forever. As such I doubt there would be much if any time savings here. It’s way more work to build and maintain that tool than it is to teach users/yourself to hit ctrl + s before clicking (which is a good habit). Plus what do you do when you don’t want that file to save or can’t save due to a worksharing issue or corruption?

As Dynamo Player uses the CLI - You will be able to build and execute Dynamo Extensions through Player, but not View Extensions (As the ViewModel isn’t spun up) :slight_smile:

2 Likes

You can definitely track if Dynamo was opened from an add-in. Nbbj tracks the number of Dynamo launches for their data mining efforts. Full disclosure, this does require knowledge of making a Revit add-in though. But, the question was more “if it was possible”. Which it technically is.

Other suggestions on here are great and I definitely think a Dynamo extension can do something along those lines. However, I do think this is something that can be done fairly easily in Revit with an add-in.

1 Like

Proof of Concept showing a dialog box on Dynamo launch.

20191008-dynamoAlert


This can be achieved through an Application-Level Revit add-in.

7 Likes

Thanks for all the answers! :slight_smile:
I’ll dive further into @john_pierson answer soon. :slight_smile: