You are on page 1of 22

AS500824

I Shipped My Scripts
John Pierson
Parallax Team

Learning Objectives
• - Learn about breaking Dynamo changes and how to prepare for them
• - Learn to effectively use Dynamo 2.13 to better document and share your graphs
• - Truly use Dynamo Player to its fullest potential
• - Discover tools that aid in “shipping” your Dynamo graph to others

Description
Placing node after node after node. Let's face it, if you have been a Dynamo user for any
amount of time you have probably seen some Dynamo graphs that are "less than perfect" and
could use some cleaning up. You may have even created some of the graphs that need to be
cleaned up along the way.
Even if you aren't a full-time Dynamo user you probably have seen the "spaghetti" mess that
can come from using it.
This class aims to demonstrate effective ways to clean up your Dynamo graphs for distribution
to others. We will cover topics from which packages to use all the way up to what the heck
lacing is. We will also observe some sample graphs that are less than perfect and cover key
ways to optimize them. If you are a beginner user, you will leave the class with ideas on how to
be better than okay at Dynamo. If you have been working with Dynamo for a while, there is still
hope for you as well. So be sure to stop by and learn how to create Dynamo graphs that are
faster and suck less.

Speaker
John Pierson is a Design Technology Specialist at Parallax Team, and a
Revit certified professional for all disciplines. At Parallax, he is engaged in
the creation of automated workflows and the exploration of computational
design solutions for the AEC industry. John is a frequent presenter at
user groups and conferences. John is also an active member of the
Dynamo community and currently manages the Dynamo package
Rhythm; which is among the top 5 most downloaded.

You can follow John at https://bio.link/johnpierson

Page 1
Dynamo 2.13+ – What’s Broken?
With Revit 2023 we received one of the biggest updates to Dynamo in a long time. This is of
course Dynamo 2.13, nicknamed “Dynamo Visual Refresh”. Dynamo received a cool new look
and feel, but it also received a few fixes that broke a few older things.

Dropdowns
Dropdowns in Dynamo are useful. So useful in fact, that most graphs use them. However, the
downside to using dropdowns is, up until now they would “forget” what was selected.

From Dynamo 2.0.4 – Dynamo 2.12.0 dropdowns only stored the index of the selected item.
Resulting in broken graphs.

Dynamo 2.12.0 – Upgrade Result


Dynamo 2.0.4 – Category Selection

If you don’t need the dropdown to be an input in Dynamo player, it is suggested to hardcode
these values.

Dynamo 2.0.4 - Category.ByName Usage Dynamo 2.12.0 – Intact Through Upgrade

Page 2
More Broken Dropdown Stuff
In Dynamo 2.13 it broke… Bad.

Insert AU caption.

But this was fixed in Revit hotfix 2023.0.2 with a few other things.

Although I suggest using the Category id if you are wanting to hardcode this data.

This will stay solid for the foreseeable future (and past)

Dropdowns were Fixed in Dynamo 2.12!!! and broken in all old versions

In Dynamo 2.12, the Dynamo teams started serializing dropdown and selection nodes
values when marked as inputs fixing the changing index as mentioned above.

But this broke as older versions of Dynamo had no way of supporting this new feature.
And as you may or may not know, with Dynamo 2.1.0 (Revit 2020), you no longer install
Dynamo yourself.

Page 3
Dynamo Bugs are Getting Increasingly Harder to Chase Across Revit Versions

Further adding to this difficulty is Dynamo is now encompassed with the “supported
versions” disclaimers constantly.

https://forum.dynamobim.com/t/categories-vs-category-byname-discrepancy-in-2-13

And for reference, here is what supported actually means. Spoiler alert, if you aren’t
using Revit 2021 and newer, your Dynamo is becoming increasingly more unsupported.

Thankfully, there are members of the Dynamo team who know that this just won’t fly.

Page 4
Dynamo future file is a package to help migrate back fixes into older Dynamo versions.
More information can be found here.

This is awesome and I think it should be more along the lines of how Dynamo is shared
in general. I see a future where we have access to installing “Dynamo Revit Nodes” from
the package manager.

Action Items for Dropdowns


1. Only use dropdowns when you want them to be changeable.
2. Install “Dynamo Future File” on all of your pre-Dynamo 2.12 installations.
3. Always test your graphs in the latest version before updating fully.
4. Pay attention to the forum.

Python Changes
Dynamo 2.10 started to introduce a new python engine, CPython. This is due to IronPython (the
previous engine) not being updated in a while. With Dynamo attaching to so many products,
security is something that the team takes very seriously.

K… So what?
The downside is this essentially breaks every python package available right now,
(which is most of them). One of the most popular packages on the package manager,
Clockwork, is almost entirely created in IronPython 2.7. That is a lot to update
There must be an easier way
Besides helping package managers update their packages, there is one other way to
ensure compatibility. Use the package manager to install the IronPython engine for
continued use!

Page 5
Simply search, ironpython on the package manager and install the engine. (Note: this
means that you as the end-user are accepting any possible risks with using an older
python engine)

The package manager saves the day again!

Page 6
Dynamo 2.13+ What’s New?
With all the broken stuff, we of course received some new features! In this section we are going
to cover the awesome ways these new features help you make your graphs suck less.

Graph Properties
Should You Use This? ⭐⭐⭐⭐⭐

Dynamo 2.12 introduced a new extension called Graph Properties.

Graph Properties Menu

At first glance, this extension was pretty neat and offered documentation of our graphs in the
raw JSON of the DYN file.

Page 7
Graph Properties View in Dynamo

The description, Graph Name, and Thumbnail (serialized in the file as base64)

Page 8
URL for “Read More” documentation and our custom property as well

Needless to say, it was really cool to see this kind of data being serialized right in the DYN file
but it did not seem to make any other difference to users.

Enter Revit 2023.


With Revit 2023, we received a new Dynamo player, and all of that data (that seemed
insignificant) was now revealed.

All new Dynamo Player interface with our new Data

Page 9
These new properties offer enormous potential and are backwards compatible for all supported*
Dynamo versions.
*in my case supported means back to Revit 2019. With the new properties, they will remain in
the file for Revit 2023 back to Revit 2021. Revit 2020 and 2019 will discard the values
unfortunately.

Better Annotation Options


With Dynamo 2.13 groups and notes received an overhaul. Groups now support a variety of
new features and notes have become more useful in general.
Groups – Better Titles and Descriptions
Should You Use This? ⭐⭐⭐⭐⭐

Groups now support descriptions in addition to the


general title.

Groups – Now Collapsible with Inputs and Outputs


Should You Use This? ⭐⭐⭐

To clean up graphs, groups now have the option to be collapsed.

Left = Pre-Collapse, Right = Fully Collapsed

Page 10
Groups in Groups (in groups)
Should You Use This? ⭐⭐⭐

Groups now support nested groups officially* (officially because this was always doable
with Monocle. )

Group Styles
Should You Use This? ⭐⭐⭐⭐⭐
Group styles are now included in Dynamo (as of 2.14). Group styles are essentially the
same thing as Monocle’s standard groups feature but included in Dynamo natively.

Dynamo’s new Group Styles Dialogue

Page 11
Monocle’s Standard Group Dialogue

Even with this having existed in monocle for a bit, this being an OOTB feature now is
amazing and we now have access to managing this for deployments.

In fact, these group settings are saved in DynamoSettings.xml

Page 12
Pinned Notes
Should You Use This? ⭐⭐⭐⭐⭐
With all these new features for groups, notes had to join in on the fun. With Dynamo 2.13
we received the ability to pin notes to nodes.

Note Pinned to Node (available under a right click menu)

Result in Dynamo Player

Page 13
While on the surface, this also does not seem like that exciting of a feature, it goes a bit
deeper that simply being able to be moved with the node.

When a node is marked as an input, pinned notes show up in Dynamo player as a


description of the input!

Pinned Wires
Should You Use This? ⭐⭐⭐⭐⭐
Along with the group and note changes wires also received a few notable upgrades.
Some of these are interactive, so we will cover those later, but one worth highlighting in
terms of annotating graphs is, Pinned Wires!

Simply hover your mouse cursor over any wire and select the pin icon.

NO MORE MESSY WIRES!

Graph Upgrade Process


I know you must be thinking, “This all looks amazing, I should just go ahead and hit upgrade on
all of my graphs, and we are good to go right???!?!”

NO

Along with this visual refresh, nodes have gained a bit of weight. This means that your
awesome graph that looked perfect in 2.12 and older, might be bumping into each other in 2.13.

For reference, here is a graph in Dynamo 2.6.1 (Revit 2021) that looks and works just fine.

Page 14
Dynamo 2.6.1 / Revit 2021

If we were to just upgrade this graph to 2023 without thinking, this is the result:

Dynamo 2.13.1 / Revit 2023

As you can see, that result kind of sucks and is a bit of a mess. Luckily there are a few ways to
handle this.

Monocle’s Graph Resizerer


Being someone who builds graphs for several clients, I have had to struggle with the Dynamo
2.13 upgrade process quite a bit. Also being someone who manages a package that works with
the Dynamo API (monocle), I went ahead and fixed this.

Enter: Monocle’s Graph Resizerer

Graph Resizerer is simple to use. You simply launch from the monocle menu, choose your
scale settings, and see the results in your current graph instantly.

Page 15
Look at this dynamo graph, lookin’ all fancy now

Batch Graph Upgrader


Jacob Small from Autodesk was kind enough to provide a “node resizer” Dynamo graph,
(Graph Resizer Dynamo Forum Post). His post actually inspired the Monocle graph resizerer
above.

Jacob regularly attends Autodesk University, so be sure to give him a high five.

Essentially you take a target directory of Dynamo graphs and choose how much you want to
move the nodes around within the DYN files.

Simple in its execution, but amazing in what it achieves

Page 16
With the graph resizer in hand, we can now run it and get a much better result. (Note: it does
place a copy of the graph one folder back, so be sure to keep that in mind)

And with the node resizer working, here we are:

Much better
Please note, that the batch graph resizer has a few bugs to work out. So, if you have nodes that
are renamed, it might fail. Visit the forum link above to report your findings.

Graph Node Manager


Introduced with Dynamo Core 2.15, we now have access to node status(es) on a finer level.

We can now explore our graphs with more precision based on if the node is in an error state,
frozen state and more.

The Graph Node Manager UI

Page 17
While this feature is only in sandbox (as of Revit 2023.0.2) It is worth mentioning as it will surely
be invaluable during Dynamo graph upgrades.

To try it out for yourself, go to DynamoBuilds.com and download the latest core version.

Managing Your Dynamo Graphs for an Entire Office


With the new Dynamo look and feel, some stuff has changed. What has not changed is how the
Dynamo team versions it.
Dynamo Uses Semantic Versioning
Semantic versioning (semver.org)

With Dynamo versioning broken down, my suggestion is to build Dynamo graphs out in the
highest version you are supporting and test backwards.

This enables the following:


1. Node sizes accounted for.
2. Weeding out of outdated packages

Page 18
Must Have Packages for Each Install
If you are taking the course of managing graphs across several Revit versions, these packages
will help manage compatibility.

Revit 2023/Dynamo 2.13.1

Dynamo Iron Python Package

The Dynamo Iron Python packages ensures compatibility with many popular packages
that have not been updated to the new CPython engine. This includes (but is not limited
to), Clockwork, Spring Nodes, Archi-Lab, Data-Shapes and others.

Revit 2022/Dynamo 2.12.0 + Revit 2021/Dynamo 2.6.1

Dynamo Future File Ensures Compatibility with Dropdowns and a few other features

Page 19
Staying Up to Date
Download Daily Builds
Daily builds are available from https://dynamobuilds.com/ and you should absolutely test
them. I routinely have 4-5 different versions on my machine for testing.

Live to Read Release Notes


That Dynamo future file thing I mentioned? I found it buried in the release notes.
https://github.com/DynamoDS/Dynamo/wiki/Release-Notes

Thoroughly QA Your Package Use


Use packages that are current and updated.

Dynamo Player Alternatives


We can’t talk about “Shipping Your Scripts” without mentioning a few of the awesome
alternative ways to deploy your Dynamo workflows.
(note: this is not an exhaustive list and includes options that are current as of Revit 2023)

Orkestra

Orkestra is a tool brought to you by the masterminds of Data-Shapes. If you have never heard
of Data-Shapes, you are missing out because it allows you to build amazing UIs in your
Dynamo graphs.

Website:

Page 20
https://www.orkestra.online/

Features:
Orkestra is a cloud-based tool that offers the ability to launch Dynamo graphs from your ribbon,
manage graph versions and embed packages within the workflows.

Price:
Free Tier and Paid Tier (inquire)

Relay

Relay is a tool developed by Parallax Team and is available for free and open-source. Being
open-source, this tool does come with limited access but it does include the ability to sync any
number of Dynamo graphs to a ribbon based on a folder structure.

Website:
https://github.com/johnpierson/Relay
https://www.notion.so/Relay-for-Revit-6732550b41d34bce8edc518c0d0e47b9

Features:
Load DYNs as a ribbon on the fly from the install location. Uses Dynamo’s built-in graph
properties to show descriptions as tooltips and URL as the F1 help.
This tool does not include a traditional installer, so setup is a bit finicky.

Price:
Free (open-source)

pyRevit

pyRevit is a tool that does a ton of things. One of these features is the ability to add Dynamo
graphs as ribbon buttons.

Website:
https://github.com/eirannejad/pyRevit

Page 21
Features:
While pyRevit offers the ability to add DYNs to the ribbon, the setup is quite cumbersome and
you essentially need to create configuration profiles for it. The Aussie BIM Guru has a great
video on this process here.

Price:
Free / Open-Source / Patreon Supported

NonicaTab

NonicaTab is a new addition to this space and is one of the only ones available in the Autodesk
App Store.

Website:
https://nonica.io/

Features:
By default, Nonica includes 12 buttons for you to use to setup DYN files. The setup process is
achieved through the ribbon and includes icon customization, description, titles, and more.
There are two versions of this tool. The free version is limited to 12 buttons and the paid version
gives you more buttons + additional features (scheduling graphs, hotkeys, package
management).

Price:
Free / $50/year or $5/month

Page 22

You might also like