We have been told that Dynamo core code can eventually support network sharing of custom node definitions. In the meantime, how can you share custom nodes between a few different pcs and laptops, keeping them all in sync?
There are a few ways to do this:
- Packages and package management
The main issue here is that if you are working on IP related code or just generally don’t want to publish your nodes to the world, there will always be some left over ‘private’ custom nodes in your definitions folder that you still may want to sync with other pcs, leaving us with…
- Shared cloud definition folder with live update to local definitions folder
The second way can be done with FreeFileSync and its partner, RealTimeSync. RealTimeSync is automatically included when you install FreeFileSync. How do we set it up?
Let’s say we have a few workstations and we want to share Dynamo definitions between them:
- Set up a shared cloud folder called LiveDefinitions between users of these pcs (Google Drive or Dropbox or similar).
- Then, set up a sync process that mirrors that cloud version to your local Dynamo definitions folder, in my case:
It might look something like this:
In the above example, I also set up a versioning folder to catch any conflicts.
The RealTimeSync can be set up as follows:
- Launch FreeFileSync and create a Mirror sync between these folders (that’s in the image above)
- Save this as a ffs_batch file
- Open that file in RealTimeSync
- Save as a ffs_real file
- Right-click and Copy this ffs_real file in Windows Explorer
- Paste shortcut into your Windows Startup folder, such as:
- Double click the shortcut in Startup and check that it runs ok. It should automatically place a red RealTimeSync icon in your task bar that polls the source folder periodically for changes. If you ever want to stop the sync, just right-click on that red icon to stop the sync running. To disable automatic startup, just delete the shortcut from the startup menu.
The final piece: make sure you save all of you custom definitions directly to the LiveDefinitions folder. In the example above, I should save all of my custom .dyf files to this folder after creating them:
C:UsersLukeGoogle DriveVirtualBuilt (LJ only)DynamowipLiveDefinitions
Even if I just right-click and edit a custom node in Dynamo, I will have to go Save As to the above folder to make this system work.
Google Drive will sync that file up, and then RealTimeSync will push it into the required Dynamo folder.
This way, the point of truth for all of your custom definitions is in the cloud, and these are downloaded and overwritten into your local Dynamo definitions folder (the one that Dynamo uses).
Use this idea with care 🙂 As always make a backup of everything first, and also remember that often simply closing and re-opening Dynamo can help to refresh the dependencies and correct some problems.
freefilesynch is an excellent idea – Have used similar approaches with robocopy and Easy2Sync but this looks more user friendly.
Yeah I have used it for lots of BIM-related project sync tasks.
If you use "%appdata%Dynamo .8definitions" as a monitoring path, you can make the solution user independent.
Great tip Dimitar, thanks!