Relay

Logo

Relay allows for you to add Dynamo graphs to your Revit ribbon.

View the Project on GitHub johnpierson/Relay

❓ What is Relay for Revit?

image

Relay is a plugin for Revit developed by john pierson. Relay allows you to add Dynamo graphs (.dyn files) to your ribbon as push button tools. This is achieved by launching Dynamo in the background (UI-Less) and running the given Dynamo graph. This requires you to have only one version of Dynamo installed and for your Dynamo Graph to be structured in a way that allows you not to require inputs or use custom nodes to feed inputs. More info here: Working With Inputs

⚖ License

https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3) Relay is available through the GPL-30 License. This means you can do anything with this code except distribute closed-source versions of the base code in the repo.

🙌 Permissions 📖 Conditions 💡 Limitations
🟢 Commercial use 🔵 Disclose source 🔴 Liability
🟢 Distribution 🔵 License and copyright notice 🔴 Warranty
🟢 Modification 🔵 Same license  
🟢 Patent use 🔵 State changes  
🟢 Private use    

💡 Basically, please be nice and contribute / improve this tool if you can.

🆘 Support

💻 General Support:

This code is provided “As-Is” and without warranty. The idea was to expose how to do this within Revit, while developing a tool for our own internal uses. If you encounter anything that you want to report, please do that on the Github Issues page,

💡 note: there are no guarantees regarding development based on the posted issues

🛠 Tested Revit & Dynamo Versions:

⏯ Usage

🔧 Installation:

Preferred Installation Path: C:\Users\%username%\AppData\Roaming\Autodesk\Revit\Addins\202x

For a simple install, simply unzip the folder from releases, to the above directory. Your folder structure should resemble the GIF to the right if you did it correctly. relayInstall

These instructions from Radu, describe the process for unzipping folders for Revit add-ins.

image Relay.addin → This loads the tool into your version of Revit and references the .dll in the Relay folder.
- Relay.dll → The code that actually loads and runs the tool.
image Relay Folder → Contains the .dll file and the Dynamo graph folder structure.

💡 The above would be the minimum to get started. Below we break down the graph folder structure in more detail.

🏗 Dynamo Graph Structure:

How to structure your folder for success.

💡 Example folder structure: (included in base installer):

📁 Base Folder Structure:

image

📂 Grouped Folder Structure (buttons in panel):

Single Button Folder View: Resulting Panel View (in Revit):
image image
image image

🏆 Best Practices for Graphs

🔌 Working with Inputs:

As you may imagine, what good is a Dynamo graph without being able to interact with it? Dynamo player manages this in its own way, but Relay relies on this interaction being designed by the original Graph author. If you do not build inputs into your graphs with Data-Shapes or something similar, then your graph will use whatever was selected last.

Selecting Model Elements:

Using Data-Shapes for selection. image

📦 Managing Packages:

By design, Relay requires your users to have all Packages installed that you use within your Dynamo graphs. This tool does not manage package dependencies for you in any way. If a user runs one of your Dynamo graphs that uses a package and they do not have it, it simply will not run to completion.

If managing packages on the fly with Dynamo graphs on the ribbon is a requirement for you. You should definitely check out, Orkestra from Data-Shapes.io.

For further reading on making your graph UI-friendly, here are some great resources:

Winning-Revit-Dynamo-Player-2017

Dynamo-BIM-Managers-Managing-Dynamo-and-Dynamo

💽 Included Sample DYNs