Description
Key Learnings
- Learn how to effectively use Dynamo 2.13 to better document and share graphs.
- Learn how to use great methods for documenting your "code" in Dynamo.
- Discover tools that aid in "shipping" our Dynamo graphs to others.
- Learn about truly using Dynamo player to its full potential.
Speaker
- John PiersonI am a Software QA Engineer on the Dynamo team at Autodesk, I am passionate about ensuring the delivery of high-quality, reliable software that empowers designers, engineers, and creators around the world. Dynamo is a cutting-edge visual programming tool that enhances workflows in design and engineering, and I take pride in playing a key role in its development by maintaining its performance, functionality, and usability.
JOHN PIERSON: Hi, everybody. My name is John Pierson. And welcome to I Shipped My Scripts, Awesome Methods for Sharing Your dynamo Graphs. I'm a design technology specialist at a BIM consultant called parallax team, and I've been using Dynamo for quite a while. So in this class, we're going to go over a whole lot of things regarding Dynamo and Dynamo related workflows, specifically within Revit.
I always like to share this at the beginning of every presentation. But I wasn't always a Dynamo user. I actually opened Dynamo for the first time in 2013 back when I was at an architecture firm. When I opened it at that architecture firm, all of the nodes turned yellow and red, and all sorts of warnings happened. And it was terrible. It was a whole mess of stuff, and it scared the heck out of me. So I closed it, and I was like, I'm never going to learn this ever. I'm never going to figure out how to do this.
And in 2014 I attended Autodesk University, just like all of you are. And I was able to learn it-- learn about Dynamo-- in a lab titled Dynamo for Dummies by Marcello Sgambelluri. It's a great lab. I encourage you take it, even though it is a few years old. But it kind of unlocked the door for me to know how to use Dynamo, and it kind of triggered that thought for me, which is really awesome.
So yeah, this is my Dynamo journey. I learned it in 2014 at AU. I started sharing Dynamo packages on the package manager in 2015 as I started to learn Dynamo. In 2016 I started to learn Python, which is always a logical next step for people in Dynamo. And then in 2017, C Sharp, which is another logical step for people to learn Dynamo, as well.
I presented it for my first time Autodesk University in 2017. And then 2018, 2019, 2020, I started building more Dynamo workflows, nodes, view extensions to Dynamo, which we'll see today, as well, for people to use. So I really started sharing a lot of this along my, quote, "Dynamo journey."
Every time I run into people at conferences I always ask them about their Dynamo journey. And it's always nice to hear when you're a part of that, as well. So I encourage you all to share your Dynamo journey and kind of embrace that community that is so powerful when it comes to Dynamo.
So that's kind of where we are right now. This is a web app that I built because I got tired of updating PowerPoint slides from my Dynamo journey. So if you want access to this, I'll include it in the handout, as well. But it basically hooks to a Google Sheet and builds this interface for you.
So last time we had an AU in person, way long ago, Dynamo nodes looked like this. They were gray, and a darker gray. And that's kind of how they looked. Fast forward to today, and this is how Dynamo nodes look now. They're in more of a dark mode, very similar to how this Autodesk University logo looks, as well. It's changed quite a bit. It's a really cool change. I think it's a welcome change. But it does take a few considerations, which we'll highlight today.
So in order to get into the content for this course, I want to take a look at the state of Dynamo as it is right now. So implementing Dynamo is a very difficult thing. You'll never hear me say it's easy. And that's because there's so many different considerations for you if you're implementing Dynamo. In this case, versioning is very weird.
We're on Revit 2023 right now, and I have clients all the way back into Revit 2019 and older. How does the Dynamo versioning work if I'm trying to update to these new things? So I made this graphic. This isn't a handout, as well, for you. You can print it out or save it or whatever. But it explains how Dynamo versioning works.
So Dynamo uses a versioning system called semantic versioning. Basically that little green number 2 is the major version. The pink 13 is the minor version. And the last one, the other green, the forest green, is the patched version.
Generally speaking, if you have a Dynamo version that starts with the same number, those graphs will work between all of those versions. So with that in mind, we should be able to build graphs at this time for Revit 2023 that work all the way back to Revit 2020 on Dynamo 2.0.4.
So I always encourage people to update and test from a higher version down. And that's still my recommendation for people moving forward with these new dark mode nodes, as well. So an outline for today's course is we're going to talk about what's broken. There are a lot of new features. But if there's one thing you get out of this course, I want you to be able to know what's going on in Dynamo, what you might encounter as you upgrade graphs and start to use those workflows that you've been building probably for years.
For me, some of the graphs I'm showing today I've had in my tool kit for at least seven years. And they've been updated each version. So they've crossed Dynamo version. They've crossed offices for me. And it's just all over the place. So knowing what's broken is a really important thing to know, as well.
And we're going to look at what's new. So we won't dwell on the broken stuff. We will look at some of the new features and how you can take advantage of those to make Dynamo even more awesome in your firm. We're going to look at how to, quote, "cope" with some of these changes, so how to plan for these changes and interact with them in a really great way, as well.
And then the last one I have on there is how to survive. So some of the workflows that we cover, we're going to look at how to package those up to share them, and some alternatives for you, as well, which is really exciting. So the first thing that we want to cover is drop down nodes.
So if you've been a Dynamo user for any amount of time, you've probably used a drop down node. If you don't know what a drop down node is, we're going to look at it here in a second. So don't worry too much. Don't get me wrong-- drop node nodes can be great. They're really useful, especially when compared to the alternative of typing a category name every time you use Dynamo.
So on the screen we have a category by name node. And we're typing in the category manually to find that category. This has a lot of friction if you're a new user. Typing all of this is not very easy to do. So using a dropdown, which we'll see next, is way easier.
So if you search for categories, there is a dropdown node that exposes every category in Revit for you to use very quickly. Categories, dropdowns, are amazing to work very quickly. And dropdowns in general are really great. That being said, you do kind of need to know what goes on with them. So that's what we're going to cover, as well.
Dropdowns are a great exploration process. Fun tip about this categories note, as well, is it does include some of the categories that you can't even see in the interface in Revit, which is interesting. If you've ever wanted to work with ceiling grid lines on a ceiling surface pattern, you can actually do that with this node, which is pretty wild. So I encourage you to check that out, as well.
You need to know what can and will break with dropdowns, though. So dropdowns are very powerful. But with that power comes considerations. This graph on the screen right now is made to work with Revit 2019 and Dynamo 2.0.4. So let's see what happens when we upgrade it.
So I went ahead and I upgraded it to Revit 2020, Dynamo 2.3.1. A lot of version numbers to remember, as well. In the primary, we have all those version numbers listed out. And that's included in the handout, as well, for you. We'll see what happened.
I had walls in my original graph. In Revit 2020, it picked windows. That's very strange. What happened there? Well, in Revit 2019, dropdowns only remember their index of what's selected. So if you have 20 categories and you pick the 15th one, which might be walls, but when you upgrade it you have 25 categories, that might change on you, which results in some really broken graphs if you don't account for it.
And we actually found this out the hard way for some of the graphs that we have at Parallax, where we upgraded them. And they were doing weird things. Because now, let's say I had something that was getting wall takeoffs, wall material takeoffs. Now it's pointing at Windows that's completely messed up.
Now let's upgrade it again-- Revit 2021, and Dynamo 2.6.1. It changed again. Structural trust tags-- that's drastically different than walls. If you were doing a workflow that's very different than this, this might just crash, depending on what your model looks like. And once again, these all start with the number 2. So they should be compatible.
Again, Revit 2022-- structural load cases is picked. So each one is different. It's not really consistent. And that's because for each Revit version, they add more categories for us to use, as well.
And finally, Dynamo 2.13, the newest one. And we're picking structural fabric reinforcement. And the nodes grew. So they're very overlapping at this point, which is an awesome, as well-- kind of frustrating. And I'll let you know when that one comes out how it looks, as well-- So, yeah.
So how do we count for this? Dropdowns are great. People have used them for years. I have tons of dropdowns in my Dynamo graphs. How do I fix it, or how do I account for it moving forward? Well, the big consideration here is you need to only use dropdowns when you want them to change. They are a UI node that allows interaction.
So if you're going to leave it as walls forever, there's no reason to use a dropdown and leave it in there after you've passed the prototyping process. So that's the biggest consideration for dropdowns. And it's what we advise people more often than not. So you will end up having to type them, so kind of that example that I showed at the beginning where it was typing out the name, and there was some friction there. It's a little harder to do.
If you were to type walls, though, this will work in all Revit versions moving up. So walls, category by name, into your collection would work. This is a stable way of doing it. So you can live happily ever after with your Dynamo graph. You're good to go. And you're happy-- unless you're on the initial release of Revit 2023, where that stopped working.
So that's another one of those things that if you're on the public first release of Revit 2023 without any patches, you will encounter this error, as well. They fix something regarding languages in that version of Dynamo for Revit, and it did break the category by name operation, which we've been using a ton over the years because we encountered that dropdown bug before.
So a little frustrating. It's this back and forth thing with dropdowns, as you're seeing. So we've revised what we suggest now. And we suggest to use the ID of the category. In Revit, every element has an ID. Built in categories have an ID. And they're not supposed to change between versions.
I say not supposed to because who knows. I can't predict the future. But for these versions of Dynamo and Revit, this is working really stable now at this point. And specifically on this slide, we are showing Monocle, which is a view extension of Dynamo, converting those dropdowns for you. So you don't have to type all that stuff every time. I wouldn't make you do that. We're all about saving time in this class. So don't worry about that.
In the handout, there is a link to the forum post that talks about some of the inner workings of this, if you really want to narrow down on that, as well. When it comes to dropdowns, Autodesk suggests using dropdowns now and not using the category by name or the category by ID option that I just demonstrated. They're saying that it works in all supported versions of Revit. So just use dropdowns.
In case you didn't know-- and there's a link in the handout for it-- supported means Revit 2023, 2022, and 2021-- three versions. Revit 2020, which has Dynamo 2.0.4, is not technically supported. And I know that I have a lot of clients that are in Revit 2020. And I'm sure a lot of you still have projects in 2020. So that's not super awesome to have to deal with.
That being said, if we were to try the dropdowns in the supported versions that they suggested, we do have something else that we have to consider. So in this case, I have a graph that I created in Revit 2023, which is Dynamo 2.13. And I'm opening it back in a supported version of Revit 2021.
Based on what they said, that's the supported version. So let's see what happens. So as we open the graph-- first I show which Dynamo version I'm in, so there's not any magic behind it. And we'll see that I'm in Dynamo 2.6 and Revit 2021. I'm going to navigate to a category Dynamo graph and open it that was created in 2013. Nothing happens.
Even my logger, if you drag the bottom up, doesn't even tell me anything happening. It's very confusing. There's no indication of what went on. And this is a graph made in Revit 2021. So what happened here? It's very strange.
It's one of those things that it doesn't even give you a warning. It just says Home on the workspace. If anyone knows what happened, I mean, share that with everyone. But what it is, is the fixed input dropdowns-- so if you mark them as input for Dynamo Player-- in Revit 2022 and Dynamo 2.12. But that broke it and all older versions of Revit and Dynamo.
So those are supposed to be compatible. But it did break it, which kind of sucks. And if you didn't know, Dynamo is not installable on Revit now. You do have to depend on the Revit updates to get Dynamo updates. So if you're in Revit 2021 and there hasn't been a patch release in a while, what are you supposed to do?
Luckily, the Dynamo team was aware of this change and they released a Dynamo package to fix this. So even though we can't install Dynamo into Revit ourselves anymore, we are able to fix it with some of these patches that they're supporting through the package manager. So if you're in Revit 2021 or older, install this package right away. This is a must have if you're working between several Revit versions.
Dynamo is interesting because it is a product that's backwards compatible. Not something we see a lot when it comes to Revit. So in this case, we do have that where it will work backwards to those older versions, as well. For this fix, I had to look in the release notes for this way down in GitHub, and I found it randomly.
So I encourage you, if you're someone managing Dynamo for a firm, to get familiar with reading release notes, the forums, and all that kind of stuff, as well. Because this stuff sometimes not communicated very well, so if you find that, you're able to help your firm be successful with it, as well. Kudos to Mike Kirschner from the Dynamo team. He's the one who published this and shared the bug fix, as well.
All right, so Python in Revit 2023 and Dynamo 2.13. Is everything OK? Is everything working? Everyone starts to get into Python as a logical next step. The answer is kind of. It's kind of working, it's kind of not. And that's because Dynamo changed their Python engine to see Python from Iron Python. So you might get this pop up. You might not. If you click Don't Show Again, you might get it again. It's very random.
They're kind of encouraging us, like a lot, to migrate to the new engine. So I encourage you to try that. But what it's essentially saying is, hey, it's time to upgrade. This warning has been present in Dynamo for a few versions now because they've been preparing us for this. And now it's time. Revit 2023, it's time. It's in there, and we need to change.
So whenever you open a graph, an older graph with Iron Python-- so Clockwork is a package, and all these other packages-- you will get a pop up or a warning that says you're not in the correct Python version. The downside is if you run the graph, you don't get any indication what's going on. It just has null values. It's very confusing. And it's not super clear, which is a little bit frustrating, if I can be honest. But it is fixable. So you are able to install this. And I'll show that here in a second.
So when it comes to Iron Python 2.7, that's what we've used in Dynamo for a very long time. With that in mind, all of these packages still use that as of the time of this class. So we have Clockwork, which is a must-have package. All these are ones that you really should have installed in Dynamo, as well.
In the handout, there's a link on how to install the Dynamo package if you're not familiar. But all of these have Iron Python in them. And they need to update to the new version. All these package authors make these packages free in their own time. So it's going to take them a little bit to get it updated. So be patient.
I even have Rhythm, which is my custom package. And it has like two or three Python nodes in there, and I haven't updated them. And I'm teaching this class telling you to update. So just be patient. It's all right. We'll survive.
You are able to install Iron Python, the engine, so that we can continue to use your Dynamo graphs right away. It's installable, once again, from the package manager. And the decision for this was made due to the team that makes Iron Python not updating anymore. They moved on to Iron Python 3, which means Iron Python 2.x, whatever version it is, isn't receiving any kind of updates, which means that it's not receiving any kind of security updates if a dependency has an issue.
So the Dynamo team realized this. And they weren't very comfortable shipping that natively with Dynamo. So now it's kind of on you to install it and accept those kind of inherent risks, as well. I'm not saying not to. I'm not saying to install. It's up to you. If it were me, I'm trying to get my Dynamo graphs to work. And I'm not about to update every package myself.
So that's just kind of my thoughts on it, as well. I want you to know that it is available, though. So that's why we're showing it here. So that's it for all the broken stuff in Dynamo. We dwelled on that long enough. Yeah, we'll look at that in a minute. Things got a little bit bigger. So, yeah.
A random thought that I have about Dynamo 2.13 and Revit 2023 is like, if you have a phone and you've ever dropped your phone and you're like, please don't be broken. That's how it feels when you upgrade a Dynamo graph into Revit 2023. But in the next few sections, we're going to help reduce that friction a bit, hopefully.
All right, so we're going to talk about what's new now. So broken stuff's exciting and all. But we're going to look at some of the new features while we build a Dynamo graph. So we're going to do this as a live demo. I'm going to build out a graph that is a keynote colorizer-- so a pretty fun one. And we'll talk about the features as we go through it.
So that's kind of a false switch to my Revit screen now. And then once again, all of the files that I'm showing are in the data set. So if you want to follow along, you're more than welcome to. Or you can dissect the graph later, as well.
We're going to look at a few different things. We're going to look at graph properties, the annotation enhancements available for us, Dynamo Player enhancements, all while making that keynote color coder graph. So let's do that now.
All right, so Revit 2023, I have a sample model that's included in the data set for us. And it just has some keynote things changed in it for the purposes of this demo. So what we're going to do is we're actually going to build this graph out. So we'll navigate to Manage Dynamo under the visual programming panel. It's been there since 2018, so it's been there for a little while. You should know that by now. But if not, that's OK. If you're in an older version, it will be under the Add Ins tab, so something to keep in mind.
So we'll fire up Dynamo. And if you don't realize, Dynamo works in a way where it attaches itself to the current Revit file. So what it's literally doing is opening up an event to change the current Revit file and attaching to it. That's why you can't switch files whenever you have Dynamo open, so kind of a fun thing to keep in mind, as well.
So this is going to click on New, just to start a new one. Awesome. And this is how it should look here. By default, Dynamo 2.13 is on Run Manual. I've changed it. But by default, it's on Run Manual. I like Run Automatic because I like to live dangerously and just let it run. So we'll see how that goes for me today, as well.
So the first thing that I suggested is to always take a look at the new menus when you get in Dynamo. So Dynamo now has a Dynamo menu. This is where your About is found. This used to be under Help. So they moved that. I still go to Help all the time and get confused. So don't worry about it if you do.
They have a Preferences menu. And within the Preferences, there's a whole lot of different things. So I mentioned that run setting. It is in Preferences for you. Under Package Manager, that's where you will see all your installed packages now.
I have a few installed for this workflow. These are must-haves, as well. So kind of keep those in mind if you're using this workflow. But yeah, we're going to close this. We are in run automatic, once again.
And the first thing we want to do is we do want to work with keynote tags. So more often than not, I would do a categorical selection. So that dropdown that we talked about, we're going to use that today. We go to Revit selection, categories. That's our category dropdown.
In order to actually click categories, we need to place one more node called elements of category. Plug these in. And we'll actually navigate to keynote tags. We'll move a little bit faster because we want to highlight features.
And we'll see that we have 13 tags in our project. So these are keynote tags that we want to figure out where they came from and color code them. So that's what we're going to do. So I mentioned before, we don't use dropdowns if we can help it. So I use it for that initial prototyping.
And Monocle, which is a view extension for Dynamo-- you can install it from the package manager-- has this little dropdown converter that you hit that little recycle icon, and it automatically converts it to this ID for you very, very quickly.
Awesome. So now we have that hardcoded and we're good to go from that point of view. You will see that we have those 13 available to us. I mentioned that we want to color code these. So if I were to navigate into one of these detail views and click on a keynote, we will see that we have a value in here called Key Source. That's what kind of keynote the user is using-- element, material, or user.
Generally speaking, User Keynotes aren't the best. They just let you tag anything and type in a value. And when I was at an architecture firm, we didn't allow people to use those. So that's what this was born out of, was necessity. In the view filters, that is not a selectable parameter. So you can't just color code them in that way, which is kind of lousy, as well.
So that parameter was key source. So what we're going to do, is we'll go ahead and open this up again. And in Dynamo, elements share criteria a lot of the time. So they get Parameter, Value by Name node, Belongs to all Elements. So you can find that under the Element subcategory. I'll place that. I'll collapse this. And there we go.
I did say that this was key source was the name of the parameter. So what we're going to do is I'm going to double click for a code block. I know that's an intimidating term sometimes. But if we type in quotes, we are able to use this as text entry, or a string, is what it's called in Dynamo.
So we'll see right away, if I plug this in, we are obtaining the key source from those key notes pretty quickly. Once again, Monocle offers all of these alignment commands that I'm using as we work within this graph. So that's something to keep in mind.
So we're going to build. We're also going to build a tool called a dictionary. So let me collapse this library, and we'll look at a thing. So in Dynamo, for a few versions now, we have access to dictionaries. So there's a dictionary category available.
And if you open it, there is a node under the Create category, the green plus sign, called By Keys Values. So what a dictionary is, it's a lookup tool that allows you to type in a string and give it a value to pull given that string. So as we can see, I'm retrieving. These are strings, these values. Those can be my keys.
So we can do-- in Dynamo, you should always know what object you're working with. So if we type an object in the search, we'll see that those are, in fact, strings. So keep that in mind, this node is super powerful for that.
All right, so with that in mind, we do have all those parameters going. So let's see here. We want to build a dictionary of color values for us to be able to use. In this case, I'm going to use a code block, once again. And we're going to type in element material and user. So we're typing these in descending values of good, worse, even worse.
So it's like better, good, worst, or something. So we'll go ahead and combine these into a list, as well. So very quickly we're just going to combine all of these guys. We'll see that we have that as a list now. We can clean that up.
And I also want to build a color palette for each of these. So this is a really awesome node that's been in Dynamo for a little while, as well. Like I said, keynotes that are element are great. Those are green, like go. Yellow or material, those are good. They're all right. And red for user, because we don't want people using user.
So now we can do, in Monocle, we can actually combine these pretty quickly, I believe, with this little shopping cart. We'll plug this into values and into keys. And now we have our entire dictionary built. And we can pull colors based on a name, a parameter name, which is pretty awesome.
Let's go ahead and clean this up and group these things. So we'll go ahead and move these around, clean them up. Kind of stickler when it comes to my graphs and cleaning them up. In Dynamo, if you hit Control G on your keyboard for group, it will create a group. And if this is your first time in this version of Dynamo, you will notice something different.
We have a description and a header. So I generally use the header in groups for a brief kind of what it does, and then the description for a further description of what's going on. So we're going to say, create dictionary of colors to look up. Awesome. So now we have that kind of going.
In Dynamo 2.13, we can actually drag nodes and add them to groups, as well, which is really, really cool. So if we kind of drag that in-- I dragged all of them. But if we drag that in, we can see we added those to a group very, very quickly. So I highly encourage you to try that, as well.
In Dynamo, we also now have the feature to collapse groups, to clean up our graph, which is really great if you're trying to clean up a really crazy workflow. So that's always an option, as well. So that's in there. And yeah, that's it for those groups right there at this point.
So we'll leave that one for our dictionary. We will actually drag this into the group, as well. And there we go. And now whenever we collapse this, it will have that one output of that dictionary-- or it should.
Awesome. So we'll just kind of leave this open for now. Now let's go in and create another group up here for our keynote collection. In Monocle, we do have access to this little group creator that's just right in Canvas, as well. And this one we're going to title it Get Keynotes and their Source.
So like I said, I like to think of it a big heading of what it does, and then a finer description within that description heading. Awesome. So now what we can do is we want to obtain the colors based on those values.
So in the dictionary category in the library, we will see that we have a node called Value at Key, as well. So if we kind of plug that in, it takes a dictionary object and a key value, which is a string, once again. And it will pull a color out for us. Really great, we now retrieve colors.
I used to do this in kind of an embarrassing way of get item and index. And it took like, 50 more nodes, and it was awful. So use dictionaries. If that's one thing you get out of today's class, get Use Dictionaries, for sure. Awesome.
So we can go ahead. I'm going to just kind of leave that as that. And we'll say Get Value, Color Value. Awesome. So now we have that. So we've covered the new grouping features, as well. So that's really nice. And what we can now do is we can go ahead and look at a few other themes in regards to overriding.
So if we go to the search and we type in override, there are several options available to us. There are some out of the box options. But there are other options from packages that just work really well. So in a package called Genius Loci. it has an option to create graphics overrides inside of Revit.
So in our case, we want to create an override graphic settings. Those settings are the equivalent of if you right click and say override graphics. So that's what's really cool about this node. So we're going to click Create Override Graphics.
This node is a little intimidating at first, just to fully admit that. But all we really want is the projection line color, and that's it. The rest default, and we're good to go. So this will do that overriding for us.
At this time, we do want to switch to Manual Run Mode, because I don't want changes to be happening in Revit while I'm working. So we'll just toggle that right now. And there we go.
Generally speaking, when I use a package, a node from a package, I'll use Control W on my keyboard to add a note. And then I'll say where it came from. So in this case, that's Genius Loki. And another new feature in Dynamo is the ability to right click on a note and pin it to the node that it belongs to-- really, really great feature that they added. And I'm super excited to see that in there.
We'll go ahead and delete this for now. But I encourage you to always do that. The reason we're going to delete it is because Monocle also has an option, two options, to annotate those very quickly, as well. So you would say annotate custom node. It pins it for you, and you're good to go.
There's this version, which is just kind of funny. It's one of the first tools I ever made. So I had fun with it. And then there's the professional mode that just looks a little bit nicer. That's the Monocle logo, for anyone who doesn't know. Cool. So we have that annotated.
Pin notes do a little bit more than what they look like on the surface. They're great to move along with nodes. But they do have a few different interactions with them, as well, which we'll look at here in a second.
Awesome. So we have that created. The next thing is we need to use these graphics settings. So we are able to set element overrides with Genius Loki, as well. So we're going to plug that in. It takes overrides. It takes elements, which are way back here, what we collected. And it takes a view. So it takes what view the element belongs to.
So that's a little bit confusing at first because that's hard to obtain, generally speaking. But if we search for owner view, this is one of those things that you just kind of know. Tags are owned by a view. So if we search owner view, we have a few options.
I like to use this Clockwork node. So we'll place this now. And it takes an element as an input and it will actually output-- and we'll run it with F5. It actually outputs the view that it belongs to on a 1 to 1 comparison. So if we plug this in, and I'll go in and kind of tile this-- oh, it already ran.
So we already see this kind of running. And now we know which ones are user keynotes very quickly. Those red ones are user keynotes. So someone's in trouble. So that's what that Clockwork node does for us, which is really nice. So what we'll do is we'll place that.
And another new feature is if you hover on wires-- so we'll hover on this wire-- you are able to visualize what's going through the wire. So if you're ever confused as to where that wire connected, hover on it, and it will give you a tooltip of the things coming out of it. You will also notice, if I hover, I have an option to put a push pin on the wire. This is completely new, and it's really great, as well.
Because now, I can kind of clean this up where those things kind of navigate around nodes. That's been a long requested feature, and I'm so glad that it's in there now. So I encourage you to use that, as well.
We'll go ahead, and if you hit Control Shift P with Monocle installed, it opens this window for you to quickly annotate the packages that nodes came from-- so another cool thing to keep in mind. We'll group this. And we'll say Get View. I'll just do it all as the title, because it's a simple node. And then we have it.
So that's overwriting these key notes for us now. But it'd be nicer if we offer our end user the ability to reset that. So let's do that now, as well.
Under Genius Loki-- so let's go to just search for override graphics. I think we might just search graphics or reset element overrides. We are able to reset those very quickly. So given a view and an element-- so we'll just change this real quick and I'll hit F5. We will see that we can reset those now.
So any time you make a change like that, it is nice to give our end user the ability to toggle it, as well. But right now, we're not able to toggle it. What's the easiest way to do that? Having someone unplug these is kind of ridiculous. And if we just daisy chain them in this way, it will set the override and undo it right away-- not fun.
Thankfully there is a way to do that. So we have a toggle or a switch. So if we search for this or that, another custom package called Rhythm has the ability to do this. So it'll take two objects and a toggle and it will actually give that result out.
So in this case, we want to use something that's a little bit more of an advanced topic, but really worth knowing, as well. We want to use a function. Functions are something that have been in Dynamo for quite a while, but a lot of people have overlooked them.
So if we go to Script, Category, Evaluate, we will see that we have Function Compose and Function Apply. In Dynamo, any node that does not have an input fulfilled, one of their inputs becomes a function. So in this case, the set element overrides became a function.
We can actually do the same thing with this other reset element override. So in this case, what we want to do is we want to take the same input view-- so if you hold Control on your keyboard, I can take that same input view. Plug it in. And we'll actually stack these, because they kind of work together.
These are now both functions. We can plug both of these in. And we'll give it a toggle so it toggles a Boolean, or a true or false value. And now we'll see that we have a function getting passed out. So in this case, it's the reset because it's false.
It's going to drag this over to the beginning of our graph, because this would be a user input. Awesome. So we have that switching now. So that's a function for us to be able to use. In this case, we would want to apply this function. And our argument would be the elements from way back over here, our keynote tags.
Those two functions share elements. So we want to use those elements to satisfy that argument that we're missing. So that's one way to do that. Let's go ahead and hit Control Shift P again and annotate these other custom nodes. I'll group this, and we'll say set or reset element overrides. Now that's what that's doing.
So very quickly, we have that kind of working now. And we're applying that function to those elements now, which is really, really nice. The last thing that I always like to do is I always like to add a watch node, so watch as an output. And I'll just name it Result by double clicking on it.
And in Dynamo if you name this, this is output. That is now an output for Dynamo Player. So we'll say do the thing, just to annotate that for now. I encourage you to annotate those better than that. But let's have a little fun.
You want to save more often than I have, too-- holy smokes-- so let's go ahead and save this really quick. And I have a data set. Once again, the data set's included with all of this stuff. We'll name this one Complete. I'll overwrite the existing one, that way it's this one. And I'll look at another feature available to us in Dynamo.
If you right click on an output port, you now have the option to break the connections or hide the wires. So in the case of this Boolean node, I want those hidden unless I want to see them-- really great feature. I encourage you to use it sparingly. Don't hide every wire in your graph. That's frustrating.
And what we'll do is we'll say-- we're going to name this a little bit specifically. So we're actually going to name this Reset Overrides, which isn't immediately clear. But we'll make it more clear here in a second. I mentioned earlier that notes do a few more things than just annotate your graph. So if we hit Control W on our keyboard, we can actually add a description to our inputs now for Dynamo Player.
So in this case, we're going to say true to reset, comma false, to color code. And then if we right click, we can pin it. And we'll make sure that this is an input now for us. So now it's an input. And in this case, I'll just name it input. Put Save, and we're good to go from there.
So this graph's complete to run in Dynamo Player. So let's take a look at that real quick. Another new feature in Dynamo is the ability to have Dynamo Player open along with Dynamo. So you don't have to close Dynamo every time now, which is awesome. That was always frustrating to me. And we'll see that this is the graph that I just created because I named it complete.
So if we were to click on this, we will see we have our input for reset, false or true, and our outputs. If we run it, it will go ahead and do all the colorizing. And I think I got those inverted. That's my bad. So you'll want to name it logically. It'd be true to override and false to reset, in this case. But we will see that is working. Toggle it. It is resetting.
So this is a working Dynamo graph now. But how do we get these descriptions and these cool icons? In Dynamo, if we go to Extensions, Graph Properties, we now have options to add a whole lot of different metadata to the file. And this holds true for recent versions. They introduced this in Revit 2022, which has Dynamo 2.12. And it just didn't seem like it did anything right away.
So what we'll do is we'll say Color Code Keynotes by Source. There is an image included in the hand or in the data set. So we will go ahead and do that. I noticed just now that I misspelled something in my image. So that's fun.
And then we'll actually give it a URL. And I'll just give it Dynamobim.org, which is the Dynamo website. Hit Save. And Dynamo Player will actually update on the fly now-- really, really nice. And we have that thumbnail and everything.
That's really nice. I encourage you to use the heck out of this feature, because it makes your Dynamo graphs way more like buttons now. So that's something really cool to keep in mind. So it also includes the URL. So this Learn More URL, you can include a video to how to use the Dynamo graph now, which is amazing.
Documenting your graphs is always really important. And I encourage you to have this link to your intranet or something like that, because it'd just be really great for your end users. So that's some of the new features that we have.
There are a few others. So there are onboarding interactive guides and things like that. I encourage you to check out. Generally speaking, though, a lot of these things are just cleaning up graphs and helping make them more, quote, "shippable." So that's really, really awesome in my book. And it makes me really excited for the future of Dynamo, as well.
So that's kind of how that one works. We'll go ahead and close this graph. We'll just close the graph. And we'll leave Revit open. All right, so let's look at a few more things that are happening with Dynamo.
So I mentioned how to cope. So upgrading graphs, all these new features that we just looked at are really exciting. But upgrading graphs is not always that exciting. So how are you going to look at fixing that? That's what we're going to cover now. If you upgrade graphs, this is what you're going to get exactly, 1 to 1. This is me upgrading the graph. And what happened?
The nodes got bigger. So they got a little bit larger in this version. And that results in a lot of overlapping nodes. You are able to clean these up a few different ways, which are linked the handout. And we'll look at a few of them now.
So we'll live demo this right quick. So I'll fire open Dynamo. And I'm opening a graph that was created in Dynamo 2.6 and Revit 2021. So in this case, you get all these warnings. It is on Run Automatic. So that's fun.
Let's switch this to Run Manual. I encourage you to always do File, Open, and don't do what I just did. Because it could crash. Thankfully it didn't. And we do see that we have all these overlapping. Let's collapse the library just to get more real estate here.
And we will see that we also have a pop up that has all sorts of different things going on. And it's a little alarming with all these exclamation points, as well. What this is telling us is I have a newer version of a package installed. So I can either install the one that it was built for, or keep my installed version. So I encourage you to always use the latest, if possible. So I'm going to go ahead and do that now. Keep installed. And there we go.
That fixes that problem. Or, the other problem of all the overlapping nodes, though, what do we do? In Dynamo, if you kind of go into groups, you can drag them around and hit Control L. And it helps a little bit. Control L ls interesting because it does more things than just fix the spacing. So you might get really weird results.
You can also do this, where you select everything and hit Control L. But what the heck was that? That's not useful. And it still looks like junk. So that doesn't help me. So let's go ahead and look at a better way to do this. And I am going to have to reopen it. So let's do that right quick. Open in manual mode.
We will still get that warning, because I didn't save the graph yet. So if we go through real quick, we can say keep this version. Dynamo serializes what packages are used now. So that's what that's for. So always use that.
In order to clean these up, Monocle also has a tool for this. So I know I mentioned Monocle a lot. And that's because it's a tool built out of my own frustrations with Dynamo in general. And this is all about saving time and making our graphs a little more easy to use.
So in Monocle, we have a tool called Graph Resizerer. I like to name things goofy. It helps you remember the tool because it's always kind of funny when I get tagged on Twitter and stuff and someone's like, he used a meme. You're darn right I did. And tag me whenever you use it. Because it's really awesome.
In 2019 at Autodesk University in the labs, everyone had the package usage dog open the whole time on the menus. And it was freaking awesome to see happen. So I encourage you all to use the tools and share with me whenever you do use them. It always makes me happy.
So yeah, if we open this, we can go ahead and change the scale to one. And we can make this run automatically. So if I click that and I start dragging these sliders, something really cool happens. We start to see the graph resolve itself. And that's because we're adding a spacing factor to those nodes very quickly.
I tend to use 1.5 and 2.25. That seems to work really well so far for me. But you can use whatever you'd like. And that's all available in the slider. In the handout, there's a link to another tool that this was inspired by to batch update graphs. It works pretty well. It's on the forum.
But it does have a few things that it messes up on. Like if you have a rhythm node and it has this little prefix, it breaks. So that's one thing that was a little frustrating. The other thing that I'm going to fix, I used to use the prefix custom package. I use a custom node now.
So what we're going to do is we're actually going to change this prefix to custom package and clear the notes. And I'm going to change it back to Custom node and reannotate those, that way they're now pinned, as well-- with the new package versions, mind you.
So that's kind of the process for upgrading that graph now. And we're good to go. If you're curious what this graph does, if I hit F5 on my keyboard, it lets you add a prefix to selected views in this little list using data shapes. So if we were to select every view. Screw it. We do see that it added an E in every side, on the front of every single view, including the sheets names, which is kind of interesting.
So that is a graph that is included in the data set for you to be able to look at. Awesome. So that's it for upgrading a graph. Other things that Dynamo has is we've used a lot of packages today. One of my biggest suggestions, and it has been for years, is do not map packages to network drives.
That's even more-- more important these days with people working remotely so much. But don't map to network drives. Because it just-- it's a nightmare to manage. The other reason, besides me complaining about it, is the Dynamo team even admits it in their release notes that it's not stable.
If you have a network drive that's bigger than a terabyte-- which, if you have one smaller than a terabyte, let me know. Because why is it even a network drive? It doesn't work very well. It actually stalls Dynamo and makes it take a very long time to load, which isn't great. It's frustrating that that's even a thing.
Yes, you can partition a drive. But good luck getting IT department to partition 100 gigabytes for Dynamo packages, specifically. Let me know if you're successful with that, too. The best practice is to use the built in location and app data. And pull the packages in with startup scripts or something like that.
One option is to just use Dynamo to sync your packages. You might have noticed I had that icon in my Dynamo Player with the little sync icon. That's also in the data set. And what that uses is the Dynamo API for Revit to grab that location and sync them from a network path. Yes, you can store your packages on a network path. Just pull them locally for users. Your laptop users will thank you, especially when they're off network.
So that's one way of doing that. That's in the data set. It doesn't have any dependencies on packages, obviously, and it uses Python-- C Python 3 to do it. So you can kind of see how that looks, as well. I encourage you to take a look at that workflow.
Another kind of cool tip here-- random. This window that's on top, that's achieved through a tool called Powertoys for Windows and it's called Always on Top. So if you need a window on top while you're working, you can actually force windows, which is really cool.
Or you can sync them when Revit opens with a custom plug-in. So I have a plug-in that's available on GitHub. It's free and open source. And what it does is it allows you to actually sync packages based on a path that you enter on installation.
So I have mine on OneDrive. I pace that path into the installer, run it. And I can actually have those sync from that synced OneDrive location, which is really great. That could be Google Drive, OneDrive, Dropbox, Citrix, all those different file sharing that let you have them locally. As long as you can look at it in File Explorer, you can enter that path, which is really nice.
So this is kind of in progress, still. But when someone opens Revit, syncing the packages is nice because they don't have ownership of them yet. The Dynamo graph version, they might have ownership of those packages, and it won't work always. This works because Revit and Dynamo have it initialized and open those packages yet. And it's still showing.
But once we open Revit here, we will see those packages start to pop in. And you do see that blue outline. That's from that powertoys plugin that I mentioned, as well, to make it stay on top, which is a really cool plug-in that I found while preparing for all of this. I use it for all my windows, too.
So yeah, you will start to see those sink in. And then we'll talk about a few other options here for us to be able to utilize syncing packages. And they're already synced. Fetch also gives you a notification on your toolbar. And it tells you your Dynamo version, which is really sweet because managing all these versions is getting a little bit confusing.
Other options are to use Windows startup scripts. So we used to use PowerShell scripts that the architecture firm I was at. And it worked really well. It works just fine. If you have that infrastructure set up, that works great. And you can point to a network path or whatever you need to. You can also use your deployment tools. So parallax uses pragmatic practices deployment tools. And those use shell scripts, as well, to sync those things.
So every day when our users log on, they get their Dynamo package syncs locally. So if they're on a laptop, they can walk away and still have access to Dynamo packages, which is really sweet. Your other option is to email people every morning to update their Dynamo packages. Don't do that.
All right, so the last topic is how to kind of survive moving forward with Dynamo. What are some of the options to make it better? First of all, make your scripts as shippable as you can. The Dynamo player stuff is awesome. Embrace all of the new features. Use them. Serialize your package names, all that kind of stuff into your graph.
Use all those features to your benefit. Don't go through and pull out all the Python from packages and all that kind of stuff. Use the Dynamo player features and Dynamo features to help your end users know what's going on.
Specifically use the mapped folders. So in Dynamo Player, we can map several folders now. So I encourage you to use those for different workflows, and to use the graph properties that we showed for the thumbnail in the description, as well. Pinned notes are one of my favorite features. I encourage you to use that. And all that metadata is really useful, as well.
There are other ways to utilize Dynamo graph besides Dynamo Player. So I wanted to highlight these. I can't speak for every tool, but they are available to you. Orchestra lets you ship Dynamo graphs as buttons on your ribbon. And it's cloud based, and manages packages for you if you have the premium version. But they have a free version, as well. And it syncs with Civil 3D, as well.
So Civil 3D users, that's for you. It helps you deploy Dynamo scripts really, really great. And it has analytics and all sorts of crazy stuff. It has more features than I could even learn preparing for this course.
Another one that's pretty new is NonicaTab. It includes a free version with 12 buttons. That's kind of what they look like. And you just set them up according to Dynamo graphs that you have. There's a premium version, as well. But the free version is pretty nice.
The last one is an open source version that I built just out of curiosity. And it lets you map Dynamo graphs using a folder structure. So it's very dependent on folder structure. And that one is available for free on GitHub and open source. Naturally, I'm a curious person. So when I see all these tools come out launching graphs off the ribbon, I was like how do you do that? So I worked on figuring it out.
So we can kind of look at that real quick. In Revit I have it installed right now. So I'll close Dynamo. It is under the Relay tab. And this folder structure represents your folder structure and your app data. So if we go to Revit add ins, 2023, we have a folder called Relay. And we have Relay graphs.
So if we wanted to add another folder to this, I'm going to actually just copy a folder. We're going to name it My New Folder. And we're just going to rename this, 2, with a 2 on it, just to keep it a little bit simple. It's going to delete these icons. Cool.
So now we kind of have that new folder going. So if you add a new folder, each folder represents a ribbon panel. So you will see those names kind of mimicked throughout. So you can add as many as you'd like. And if I hit sync, it will add that new one, as well. So I will see that I have new folder and chart wall type usage.
It does use the description from the graph properties for that description on the tooltip. And it also uses the URL for the F1 help. So those are features that are just integrated into Dynamo, so no extra set up for you. And that graph is right there.
We do have all these different graphs. If you want UI for this, it doesn't do that for you. Some of the other tools I mentioned do. But if you use data shapes, which I did for this prefix graph that we looked at, that will pop up the UI for you really nicely. So that is a feature that you do have available to you if you use data shapes.
It's going to add an exclamation point to every view now. And we'll see, we have an exclamation point now. So I encourage you to check this out. There's thorough documentation on the GitHub link that's in the handout. And yeah, have fun with it. It's a really great way to ship your Dynamo graph to your users. And we have quite a few users of it who do some pretty crazy stuff with it.
Closing thoughts, so kind of to wrap this up and button it up a bit-- in order to make your Dynamo journey a successful one, I encourage you to thoroughly document your Dynamo graphs, thoroughly test them. I encourage you to test from the highest version you want to support downward. And you can kind of work around that. And I encourage you to share-- sharing in the way of community, sharing Dynamo graphs, packages, all sorts of different things.
And why share? For me, personally, when I started learning Dynamo in 2014, I got on the forums right away to ask questions. But then I started helping people. Along the way I learned a ton about Dynamo and how to use it. That's kind of why where I'm at today, I believe.
I'm a very big believer in, if you live generously, your whole world gets a whole lot bigger. And honestly, all of these people that I've met at conferences are my friends now. I've learned a ton helping people. But I also have some of my very close friends that I've met through this community.
And the bottom right, actually, that Aaron. And I work for Aaron now. So I met him through the conferences. And here we are. So I encourage you to network and share. That way you can meet people, learn more, and just kind of embrace that community. That's probably the best part of the Dynamo software, is the community as a whole.
Additionally, if you share, people know what you can do. So this is a quote from Adam Savage that I really like. And it says, "No one is going to know what you can do if you do not talk about it." So I encourage you to share your work [INAUDIBLE], share what you can do, share packages. That's why so much of my stuff is open source-- because I'm able to share what I can do.
And in the event that anyone ever wants to hire me to build something, I can point them to my GitHub and say, there's what I've done before. Are you interested? So it's kind of your resume that you're working on, as well.
That in mind, I encourage you to reach out. I have all of my links here, my Twitter. Reach out to me. Say hi. If you have any questions, let me know, too. This is my blog, and then my company website, the company I work for, Parallax Team. I document Dynamo workflows on my blog all the time, as well.
And have fun. I encourage you to build out Dynamo graphs. Experiment with the new version, share, and just start to embrace that Dynamo journey quite a bit. And I appreciate you all checking out this class. I hope it helps you along your way on your Dynamo journey. And always have fun. That's something I always like to leave people with, is have fun with all these things.
Downloads
Tags
Product | |
Topics |