Description
Key Learnings
- Gain an introductory understanding of version control processes
- Understand key terms for Git processes
- Learn how to manage your files using version control
- Learn how to actively contribute to open-source projects
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: All right. Is this on? Good. I think they're recording this one so I'll get in as many AutoCAD jokes as I can. How's everyone doing? Good? Yeah? Awake-- I almost said asleep. Awake? Cool Who else had a good second day of-- what is today? OK, good. Everyone's doing good?
Some good classes? Who all's taking Dynamo classes? Sweet. Who all's taking Revit classes? Sweet. Who all's taking AutoCAD classes? OK, good. I'll leave you alone. That's that talk. That's all I'll do.
I used to use AutoCAD. That's what I learned first. And we're old friends who lost touch. So he went down a different path, yeah. Yeah, it's still around though. All right, so we've got a few more coming. That's cool. There's seats mixed around. So this is Git It Together-- An Introduction to Version Control for Revit Users.
So that's what class you're in, in case you didn't know. Cool? All right. And I like to try to be interactive with everyone. This is a prettier version of the slide that I like.
All right, so we're going to go over the summary real quick. I won't read this whole thing because what really matters to us is version control lets you manage your visions regarding code. So who all's heard of version control before this class? Quite a few. Cool. Awesome.
Who all uses Dynamo on a daily basis? Sweet. That's awesome because this class is going to kind of appeal to you quite a bit. With Dynamo it's not so fun when people break things that you worked very hard on. So that's what we're gonna have to fix and we'll work on.
So we're going to introduce the process and key terms and explain why version control matters to all of you. It does matter, especially when you're the coder or Dynamo person or whatever for your firm, right? That way when Bob overwrite your files, you have another version of it somewhere, right? Right? Cool.
So we're going to gain an introductory understanding of the version control process. We're going to understand some key terms. We're going to learn how to manage some files using version control.
I have a virtual machine running so there's two versions of John that are going to be modifying files. It's gonna be fun. And we're going to learn how to actively contribute to open source projects.
So one more time, who all was in my Python lab earlier? Raise your hands. I'm gonna make you keep moving because this is the last class of the day. I talked about a GitHub resource from Saul in there. It's on GitHub, all of his code. So if you ever want to contribute, you can after learning some of these processes and terms and things like that.
That'd be like a dream come true if I see pull requests from people in my lab for Saul's repo because it'll be neat. It'll be sweet. They used what they learned, right? It didn't stay in Vegas.
All right, so that's me. My name's John Pierson. I'm a design technology specialist at Parallax Team. We're a bin implementation consultancy. So we do everything from who is Revit? To I'm really good at Revit, make it better. That's what we do.
Revit templates, Revit families, coding, Dynamo scripts. I build Revit add-ins, I make memes, I do all kinds of random stuff. And you've probably seen some of my stuff as well. I've been a Revit user since 2012. The first version I was in was 2013, 2012. That's kind of how long I've been using it. So big changes from purple to blue, right? Sweet.
I've been a Dynamo user since 2014. So I always like to tell this story because there's a huge interest in Dynamo and I really, really like Dynamo. I got the sweater right here.
It didn't just happen overnight. I started trying to use Dynamo in 2013. I opened it and it was intimidating. I was like, what am I suppose-- and it was back when Dynamo was on .63 and it was really ugly. It had yellow nodes and orange-- it was very strange looking. It was a weird environment to be in and it was super unstable at the time.
So I opened it in 2013, ran away from it. And in 2014 I came to Autodesk University and I took some classes from Marcello and that's when it clicked for me. I was like, oh my goodness, we can use this to start to manipulate data and do some cool things. From there, I started using it a lot more and I published Dynamo packages as well.
So who all's heard of Rhythm for Dynamo, if you're a Dynamo user? Awesome. That's my Dynamo package that I built. I started building that in 2015 because I had all these workflows that I wanted to share. Because I was like, these seem kind of useful. Maybe other people will use them.
So if you want to catch up with me later and tell me what you use it for, that'd be great because sometimes I don't know what people are doing with it. Sometimes they're doing bad things, if you know which nodes I'm talking about. If you're in Carl's class yesterday.
I have another package called Bang!, which manages Revit warnings. So whenever you have warnings in your model, which never happens, right? We never have warnings. Even the sample model has warnings. So yes, they do have warnings. So you can manage those with Bang!
DuctTape is a package that I collaborate on with Jason Boehning. It's for MEP workflows and it needs updated really bad. It only has a few nodes in it. And Monocle, which is a view extension for Dynamo. We'll see a little of that today. I'll show it, that way you're aware of some of the stuff available to you in Dynamo beyond nodes and things like that.
I spoke at BILT and AU. And last year, I taught a Revit family's lab here that got top rated. So everyone who attended that or watched that, thank you very much. That means a lot to me. It was my first time speaking, last AU. So getting that top rated speaker thing meant a lot. And it's awesome. It's why we do it, to be able to see you guys get some good stuff out of it.
All right, and that's not it. OK, whoa, whoa whoa. Hold on. So this is the team I work with. I work with a guy named Aaron Maller. If you've heard of him, he's always on Revit forum. And he builds doors I think, right? Something like that. He's in the exhibit hall. We have a booth. So if you want to talk to him and see what all we do, feel free to drop by.
I've been trying to hang out in there as much as I can but I've been in a lot of labs. This week I have eight labs that I've been helping with or teaching in some form. So it's been interesting. It's been a heck of a week. It's been fun because I get to meet all kinds of different people when I do that.
Those are our Twitter handles, so while this is going on feel free to tag me and all that kind of stuff. And say what you think about the class. If I get something completely wrong, call me out on it. That's fine too. I'm all open to learning.
I showed this in my Python lab and then I added it to this one because I liked it so much. This is kind of where I came from. So I started out being a Revit family creation person and modeler and template person at an architecture firm. I started learning Dynamo and my career took a very different path. It was pretty wild.
So in 2014, I started using Dynamo. 2015, I published some stuff. Started hacking away in Python, which you probably saw. In 2017, I was really interested in coding. I knew that that was something I wanted to do because I just think having the computer do work for me is kind of beautiful.
So my wife actually suggested I take a coding boot camp. I did and that's kind of helped as well. And then I also met with Marcello and saw some cool stuff he was doing and it was awesome. I have a lot of blog posts out there about it. And all this other stuff. So yeah.
So who are you all? So who all in here I've asked a bunch of questions already but who all's architects in here? Cool. Structural? Cool. MEP? All right. Cool. We've got some MEP in here. I like it. Awesome. So give me suggestions on what to add to DuctTape. That would help. Yeah. Awesome.
And I've asked who all uses Dynamo already. Owners? Cool, that's awesome. I like it. I forget that one a bit but I'm glad I asked it. Cool. So now when you're here, you get to know what kind of things you could be asking of people. Keep them honest, right? I already asked who all the Dynamo users were. Who all-- we'll get more into it in a bit.
So what is Git? So I didn't misspell it. I was joking earlier. Git. What is that? It's a version control software. It manages changes to a project without overwriting the project. So kind of like some Revit backup files but it sucks less. Yeah, right?
It was created in 2005 by a Linux dude. That guy's really cool. And it prevents users from overwriting each other's files or screwing up your stuff and saving over it and then blaming you, right?
Who all's used Dynamo 2.0. so far? You've probably use it at AU if you've taken Dynamo labs. Who all used 1.3 before? And who all knows that they're not backwards compatible from 2.0 to 1.3? Whoo, it's not fun.
When that came out and they said that that happened and it's like a Revit upgrade, I freaked out, as a consultant. Because a Dynamo is my deliverable a lot of time to clients.
So having version control makes a lot of sense because if someone upgrades it to 2.0 and you didn't want that to happen, now we can go backwards if we needed to. And we'll actually do that today.
It's awesome because versions are saved as snapshots that you can reuse. You can merge changes and review the differences of a file. You lose less work and you get to worry about other cool stuff, right? You get to learn more about Dynamo or whatever you're doing instead of trying to pull a backup from the tape drives at your IT manager's house. We had to do that once. It sucked.
So why do we need to know this? I think we're starting to get some buy in, right? I think everyone's kind of on board, if you're in here. Sometimes we suck at managing files. Who all's seen something like this? Revision 2, revision 3, really this time, final, revision 1, copy 2, copy 3, copy-- yeah, I've seen that a lot.
And a lot of times, we're indecisive. And that's because we're like, well, I liked this version. But I tweaked this and this version. And I tweaked this and this version. And which one's the real one now? And all of them have like a very similar edit date because I did that real quick. But sometimes it gets really weird, especially when the creation date-- it's freaky.
Sometimes we have the experience of "it worked yesterday." Especially with a Dynamo graph, right? I saved it. I sent it to my colleague. They opened it. And they went, what the heck are you doing? So it's nice to be able to go backwards and see what's going on in our Dynamo graphs.
Why do we need to know this? We've all ran into the user does what they want. Marcello's a really good friend of mine. And he made this comic for this. He has a whole AEC Complex comic website. Check it out. It's funny.
But he made this to where it's kind of a typical argument of someone in a firm who did something not so fun, upgraded some Dynamo files, in this case. So a little plug for his comic.
Why don't we all know this already, right? So who all heard of GitHub again or Git? Quite a few. Who all's used it I guess is a better question? OK. The reasons we all don't use this is because a lot of the time, if you Google "GitHub," it shows you command line stuff. Git push, Git commit, Git pull, all this different stuff that I'm not dealing with.
I don't want to-- I'm not a command line person. I'm someone who's graphic-- I'm a Dynamo programmer first. So I am very graphical and visual with how I do things, right? So when it's command line, it's something that adds a little bit of a different entry level, unfortunately.
Also you don't know what you don't know. If you've never heard of GitHub or Git, how the hell are you supposed to know? That's why you're here, right? It's also not the most intuitive thing because a lot of the terms, I've said a few of them already, Git push, Git pull does any of that ring a bell? It's a little weird. Pull request, merge. What the heck?
So I'm going to relate it all back to Revit terms as well because we're all Revit users, right? Nodding heads is fine. It's late. Some people we're halfway through a drink. So we're going to look over some key terminology. I send this to people routinely.
All right, so the first one is command line. So it's the text based input for Git. And this is definitely not how we're doing this today because I don't know how to do it, right? OK, cool. Forgive me. Repository or repo. So this is where projects live.
So in GitHub, specifically, which we'll be using today, you have this idea of a repository, which is where your project lives. Very similar to like a Revit central file. That's how we can think about it, just to relate that back. And those are safes or something.
Key terminology-- version control. So I've said that a few times as well. And I also already gave that punchline away. Yeah. So we can have different snapshots. So I've used the term "commit" a few times as well. It's less scary than the image. A commit is you pushing changes to Git, to your project.
So each time you commit to the repo, it takes a snapshot. That way you could go back to it if you need to. Really cool stuff. It's like a sync with central but it's also way better. It'll work a lot better. So we're sending our changes off to the repo up in the cloud, right?
Another one is branch for terminology and this is all in the handout as well. This allows people to literally branch off and work on their own version of the file and decide if they want to put that back afterward.
So it's like someone taking half your cake mix and doing their thing too and putting it back in after it's good I suppose. It's very similar to having a local file that you make changes in and then you sync with central. Very similar thought process.
In GitHub it actually has these visuals where it tells you what's going on. So in the case of software development, you can have it where it's doing one thing but someone branches off to make it do something else.
Oh, and if you guys have any questions, shout them out while we're going through this. I like questions. If we get caught up on two questions the whole time, that's fine because we got something out of it.
Another one is fork, which is kind of a weird one too. It's your very own copy of the project that's separate but it still maintains a connection to the source. So it's like someone doing a Save As of a Revit model. But instead of not having a connection, now we can push the changes back if we need to.
Who all's had people save as Revit models make changes and hope it makes its way to the Revit model? Yeah. You got to fire those guys. Another one's pull requests. So this is how you submit contributions to an open project. So this one's really big.
Dynamo is open source and it accepts outside pull requests from users. So if you get really frustrated with something in Dynamo and you want it to act different and you have the coding chops for it, you can modify it and push it back to Dynamo and they'll merge that change. That's what a pull request is. So we'll look at that a bit.
This is an example. You put a description. This one's actually a really cool one that we might look at. This one, if you hold down Control on Dynamo, it keeps bringing out other strings for you on the input ports. There's a GIF on there, or "JIF" that you can check out. I typically say "JIF" just to make everyone mad. So pull requests, very cool stuff.
Another one's gitignore. Who all's heard of gitignore? A few? Cool. When you're managing a project sometimes you don't want every file to go up to the project or the repo in the cloud. So there's this concept of a file called .gitignore that has some extensions in it that it will ignore. It's really cool.
So for this class, I built it all on GitHub and I used Camtasia and they have those CSPROJ files that are freaking huge. I did a gitignore, that way I'm not uploading those to GitHub. I just uploaded the compiled video files for all of you. So you have the data sets already too. You don't have to rely on a AU app, which is a great app. It's not so great because you can't get to it on your computer, that part's the hard part.
Once again, this AU class was built using GitHub. So if we go to GitHub.com/JohnPierson-- which is my username, --AU2018 we can see that I've been working on this thing. So I actually made myself use GitHub for this class, which was interesting. So it wasn't even about code. I was my PowerPoint, my resources, all that kind of stuff.
Here's some more resources. And we'll get through them as we work through some of the examples because we'll do some live demo. This one showed up as an industry talk but I'm going to do a lot of live demo. These are all good resources. Licenses are important because you got to be specific and tell people what your stuff should be used for or not.
In the case of this class, I gave it a Creative Commons license. That way you can share it if you want. But you can't turn around and sell my presentation. Kind of funny. People tried it, right?
All right, cool. So now what we'll do is we'll build some workflows. And we're going to use version control forum and then we'll just look at GitHub a little bit too and work through it.
So we'll start a project, we'll establish the ReadMe, so what people land on, and a gitignore. We'll choose a license and we'll build some stuff in Dynamo as an example and manage it and then have my other username break it. That way we can blame that guy.
So we have a few different workflows as well. I'll get some audience interaction going because I have a wonderful workflows use. So with Dynamo, we can actually read Revit families, get their category without Revit. Has anyone ever needed to know what an RFA is of the category? What category an RFA is, no one? For family audits, things like that, or versions that Revit files are.
Who all's needed to load view templates from files in Revit? A few? And who all just wants to screw with Revit and have fun? Hey, that's cool. That's what I like. That's one we'll do then.
All these examples will be on the GitHub as well. This one reads the Revit model as a text file, figures out what category Revit version it is, and writes it to an Excel file for you. Pretty cool because you can audit your entire directory just in Dynamo Sandbox, which I'll show what that is in a second.
I'll load view templates from file, we showed that in Carl Storms' packages class as well. So it's in that data set all included on the repo. And then the modify Revit ribbon, we'll just break that down a bit and show how that works just because it's fun.
Well, we're not done yet. You're not free yet. So what we're going to do is we're going to actually navigate to GitHub. So this is GitHub. It's GitHub.com.
This is an interface for being able to git workflows. To be able do version control, right? It's very popular. It's free. It's recently got acquired by Microsoft. I don't know how you feel about that. Some people don't like that so much.
They've added a ton of features since Microsoft acquired it though so I'm kind of happy. Added the ability to move things around in different ways, which is awesome. This is kind of a lining page when you do have a GitHub profile already. So what we'll do is we'll actually jump to the Dynamo one and I'll show you a few things.
So this is the Dynamo GitHub of all of their source code, open source project. Actually license through something called the MIT license. So if we click on View License, we'll see what kind of license this thing has. Oh, it's Apache. It has a few different ones for some of the open source libraries they use.
This is important because we want to be able to tell people how to use our resources. With GitHub, whenever you sign up and it's free, all your projects are open but you can pay to have private ones as well. Very important to keep in mind for IP and things like that. It's always a concern.
If you wanted to just be open and share everything, that's cool too. It's up to you. So this is the GitHub landing page. So we have all the code. So if we look at this, we have code, issues, pull requests, projects, blah, blah, blah.
So issues are where you can go and start to file like things that aren't working so well within the code. On the Dynamo one, there's quite a few complaints. It's a pretty crazy software what it's doing. So people come on here and file what's going on.
So if you had your own GitHub page for your Dynamo scripts or things like that, you can have your users create issues to remind you things that need fix and you can track it. Let's actually go to this class' repo and look at that a little bit.
So we'll go to Repos. Here here's this class. Cool. And we have this nice landing page, which is a read me. It tells you where you're at, tells you what license it is, and it has it broken down. This is done in a format called markdown, which is similar to an HTML kind of thing. Also has other few resources.
Within GitHub, we also have the ability to have projects who all uses cello or heard a cello at least? OK, cool. It's like Kanban, "Kanbon" project management. So it has this idea of having these little post-its that you drag between boards and figure out what you're doing. So within GitHub, you have that option as well. It has stuff I need to do. Oh wait, I actually already did the PowerPoint. So that's to done.
You can have different things that you're working on. I had made those videos already. And I have another one that says "present this class." I get to move that when this is done, right? So that's exciting. And you start to see progress of where you're at in your project.
So as people give you ideas of stuff-- so like in a Dynamo context, you can add those to this board and start to see how you're hammering out their ideas. Really kind of a cool thing to do. It also supports GIFs. It's awesome. I love it. So yeah, I always check that first. When I try a new software, I'm like, does it support this? If not, I have a problem with it. Cool.
So that's the projects that you can have within it. Within the code we can see all the commits that I've made. So commit is me pushing to the repo at change, right? We getting that? That was in the key terminology theme. So we can click on Commits and see what all I've done.
So this class has changed a bit here and there. I initially built it offline and then I kind of rebuilt it on GitHub just because my thought process is a little jumbled sometimes. So we can see stuff like revisions. What does that mean? What did John revise, right?
So click on Revisions and we'll see that I changed-- and let's see if I can do this actually. We'll see that I changed the PowerPoint. So I changed the PowerPoint, right? So it tells me, hey, he changed that. Five changed files. I changed the PDF as well. I now added some other stuff. I added some P&Gs for my PowerPoint too.
So now you could start to see what people've done in your repo or your project, which is really nice because when someone updates like a Dynamo file, do you know what they added necessarily? No, not a lot of the time. So we'll do is I'll close this. And we'll see more differences. Let's get rid of that red line now. We'll see more differences when we get into some other files.
If you do view with PowerPoint and things like that, it's not really going to show you differences. It will with Dynamo, which we'll see in a second. Let's go back to the landing page. And we'll see two contributors, that's interesting. So yeah, that's kind of the overview of this class. You also have other options of being able to see some analytics. So insights.
So you could see when I was most busy on it, when I worked on it a lot, and then it kind of dwindled down as we got closer. Which is a good thing, right? I wasn't changing it like crazy till today. So it kind of went whoom and fell down. Classic John made one commit. That's that other guy that I told you about.
So I made another account that we'll write to here in a second. And this class is 60 minutes, OK. We can see some of the traffic, how it peaked. So now you can start to see who all's modifying things, really cool. And you can see the differences between who is more active or not. Oh this is visitors actually.
So I had someone who right when I started the repo, they started following it right away. And I was like, oh man, someone's watching me now. But it's fine. Hopefully, they learned a lot from it, right?
So these are all the analytics. You can see all this as well. It is like open source, which is kind of cool. So yeah. If you were in the Dynamo labs on Monday, we went through it a little. But there's this concept of downloading a zip file of a repo, so all the source code. Or you can also open it in like a GitHub UI, which we'll do in a second. Cool.
So let's go ahead and start a repo and build some graphs to do some stuff. So what I'll do is I'll click on GitHub, go home. I'm not going to go through how to sign up for a website. I think you all can figure it out, right?
It's already started to GitHub. We'll name this one "AU-example." So AU-example. A description's optional. So I'll just leave that. We'll go ahead and just give it an initial gitignore. I choose c just because. You can choose any of them. And we'll add a license.
In the case of this class, there's a lot of different licenses to choose from. But if you go to Choose a License, you can go on here and start to describe what your project wants to achieve. So you can go through here and figure out what you want.
So you can be very simple, a lot of permission to modify your code or do whatever they want. You could have other people collaborate and in it stays open source and that's like, the rule.
And whatever this one is. This one's for free software to say like don't sue me. So that one's kind of nice when you're building a Dynamo package. So that one's in there as well. So those are the licenses. That's in the handout. Choosing a license is pretty important. I closed the tab.
For now, we're just going to choose the MIT license. That's a very permissive, pretty simple license that's easy to use. By default, Dynamo packages are MIT licensed when you publish it. We'll create a repository. So it'll create that for you. This is all online on the GitHub website. So I recorded videos too because man kind of scary.
And what we need to do is we need to work on this on our desktop. This is all on their website right now, right? Not great. So we could do is GitHub has an app. So if use search for GitHub desktop, you can download it. It's a nice little cat icon. But if we click Open and Desktop, it'll launch it.
And now I need to tell it where does this repository live on my machine. So this is like creating my local file. Everyone follow that? So I just need to tell it where to go.
So in this case, we'll actually-- that was lagging and it scared me. And so I'll actually go to my desktop. Let's get rid of this little thing for now. Did everyone know what they're in form whenever they picked a GitHub class at the end of the day?
And we'll make one AU. I'll go in that folder and hit select folder and we'll clone it. So this is pulling that GitHub repo to my desktop to be able to do things to it. So I'll take a quick second and what we'll do is we'll just fire up the Revit sample model. That way we can do some stuff. And my fans kicking on like crazy, so that's kind of fun.
And we'll start to see some files appear. And I think it's done. I also have a virtual machine running, which is pretty fun. If we right click, we can edit this. If you don't have Notepad++, install it please. Stop using Notepad.
And we can see that we have a lot of things to ignore within this right now. So like I said, I started with some template. Generally, I'll just delete all this stuff. And I'll tell it what I want to ignore. In my case, I'm not really ignoring anything quite yet. But I would ignore something like the .001 RFAs or the .D-y-n for backup Dynamo files or something.
So I'll just hit Save because it doesn't really matter on that one. And we also have the license and then this kind of does all the magic. This tells your local repository to communicate with GitHub. So that's what that is.
And the reason we're doing this on our desktop is because even their web app's a little hard to create folders and things like that. To create a folder, you have to do Create New File, make a blank text file, add the folder name and yeah, that's intuitive, right? People complain about Revit and I'm like, why?
So what we can do is we can create a new folder called Dynamo graphs, right? Or something like that. And we won't type it all crazy. So now I have a folder for some Dynamo graphs.
Within Revit, I'll go to the Manage tab, Dynamo, Dynamo 2.0.1. Just because it's a little nicer to use right now. There's two versions, like I said. 133 and 201 work with Revit 17 through 19.
And you know what? I did mess that up. I wanted to do this one in 1.3 and then change it but it's OK. So we could do is we'll actually start a Dynamo graph. I'm actually going to restart it in 133. Now we have a new Dynamo graph, right? Everyone's done that before or have quite a few of us. If you haven't, you're learning it now.
Within Dynamo, I'm going to go in and place a few things. I really shouldn't have opened 201. So that's the other thing with Dynamo 1.3 and 2.0. once your open one, you have to close Revit and reopen it. Not so fun when you're doing a live demo. And this is my other GitHub hanging out. So we'll leave him alone for now.
So manage Dynamo 133. We're going to jack with our ribbons is what we're going to do. So not the most useful Dynamo graph but you'll see the GitHub stuff. All right so we'll click on New. This is 133. And I want to show something else.
So if we are on the home page of Dynamo, do you see this little template right here? Everyone see that? Who all's wished that Dynamo has templates for color coding?
I did and someone showed me this and I wish I remembered who it was. Whoever they were, thank you. But in the samples folder, in the program data for Dynamo, you can create a folder called "templates" and place a Dyn in there to reuse.
So what we actually have at Parallax is if you click on that template, it's already has that starting for you. It's really useful when you're building Dynamo graphs to try to color code and be really efficient. That's the idea behind that. And then all you do is a save as.
So what we're going to do is on my desktop under AU, AU example Dynamo graphs, we're going to name this "ribbon modify." And we're going to save it. This graph has just started. I haven't really started doing anything quite yet, right?
I want to show how to get this to GitHub now. So within my GitHub application we can start to see a few things, which are really exciting. That's red. Can anyone see it as red? It's red, trust me. Wow.
So what happens is it turns red to tell you you removed something from the file. I removed all that stuff. So it is red, trust me. Come look if you want. So I removed all of that data from that gitignore and then I also added the Dyn for ribbon modify, right?
That's all green. You can see green now, right? No, still no? Oh man, it's green, trust me. It also has a plus sign. We can all see the plus sign, I think. That means I added all this data to that project. So now it's starting to track that change for me. It's really cool.
You can also see that a Dynamo 1.3 graph is XML based, which means it has these brackets. That's important to keep in mind when you're a Dynamo user in your firm. If someone upgrades it to 2.0, you can really bust some really easily. And we'll see that in a second.
So now what we can do is we can upload these files to GitHub. So I'm going to say initial upload. I'm going to put I put the Dynamo file in there. And you can commit to master. Go away. And then that's now staged to be able to push to the cloud, right? So now we just got to push it out there. So we're sending it off on the boat.
So it's seeing what all it needs to change. It's a total of five things. And if we jump over here, we'll see some stuff update. And we'll see that I'm the guy who did it. I'm responsible, right? Everyone see that?
If I go in here, I can see that I have my Dynamo graph in there. That is a snapshot of where it is right now. So if I ever have to go back to that, which we will in a second, we can. That's exciting. Because now it's not just saved on some user's desktop or the network drive and they modify it.
Dynamo does have a concept of backups. But backup your backups, right? Come on, guys. Cool. So now what we'll do is we'll actually jump to my other users. So this is a virtual machine. And we'll go ahead and add this person to the project. That way he can add some stuff, right?
So I'll copy the address. That's what you would send to your person. Classic John. There's an ongoing joke at my work, at Parallax team that Aaron'll Google a Dynamo problem, he'll find an old Dynamo forum answer from a long time ago and classic John helped him. So it's kind of funny. I'm always like, what did Classic John say? I don't know if I trust that guy sometimes. He was a little crazy.
So now we are on the repo started by John Pierson and not Classic John. So we can click this little fork icon and see that nice little thing getting stabbed on the book. So now I'm going on my own version of this project as Classic John. And I could do the same thing, open in desktop, open GitHub desktop, and make a folder on my desktop.
So now I have another local copy on my virtual machine. So we'll do a new folder, au, we'll do it lowercase this time. I'll do clone. So now this guy has a copy of the project, right? And we'll see that. My fan's kicking on now. AU, AU Example, Dynamo Graphs, Ribbon Modify. So this dude could contribute to my project and we can build some cool stuff.
So what he does is he opens up Revit as well. Manage, Dynamo, and we'll see something. Do you guys hear this fan? It's crazy. It's awesome. We're turning it up to 11, right?
We'll click New because I want to show you something. Does this look different than 1.3? The way I know is this right here. These pretty icons in the add-ons category. This virtual machine only has 2.0 installed.
But he wants to help out, right? Yeah. Wants to be helpful. You guys, come on now. I know it's the last one but I'm going to tell them to lock the door-- no, I'm just kidding.
This dude wants to help out. So what he's going to do is do Open, Desktop, AU, AU example, Dynamo Graphs, Ribbon Modify, Open. No harm done, right?
He's going to start help me build stuff. So he has Rhythm installed. So what he's going to do is we're going to modify the ribbon just to have fun. But we'll just place one node for now.
So where is that stuff? Where did I put it? Oh, yeah. So modifiers, we can rotate the ribbon, we can set the color. We can do all kinds of cool stuff. So he's like, all right, I know we're going to use these nodes. So they're there for you to use, other John, in this case.
I mentioned extensions earlier so I just want to show them. Extensions are add-ons for Dynamo that let you do cool stuff. So I have a little aligned window that you're able to use. It's on the package manager. It's called Monocle. Helps you build better Dynamo graphs. So you can use that.
So he added a few nodes. You can even add a note if you wanted, I won't. And hit Save. Back in GitHub we can see that we now have a .backup. So I can ignore that actually.
So if I were to edit the gitignore with a notepad. And we'll rename this to make more sense. Files to ignore. We're going to do .backup and hit Save, Minimize.
And now I don't think you can have spaces here. So we'll do that. Maybe when I push it, it'll ignore it. We'll see. So now we have this ribbon modify updated. I updated the gitignore as well. And maybe the .backup is a little different but whatever. And we see all this addition in here.
So we see all these pluses because that's a backup file. And in this one it's red, trust me but it also has a minus sign. I removed all of this. I didn't even know I removed all that. All I did was open the file and added a few nodes and hit Save, right? Did I type that much stuff? No.
If I scroll down, we can see that it looks pretty different. Now we have curly braces and it's all green. And I changed a lot of stuff that I even know I changed. The reason is between 1.3 and 2.0 we went from XML, which had the brackets to curly braces, which is JSON.
JSON's a move towards a new file format to be able to integrate better with web workflows. That's what I've been told. It's a good move, trust me. But it's like a Revit upgrade so you need to be prepared for it. So this guy, he didn't pay attention that, right? So he said, I added nodes. And I'll do it again. Added nodes, that is all.
And we'll commit that to my fork. So we'll push it. It's exciting stuff but not so sexy, right? And now we can see that classic John, all he did was added nodes, right? Cool. You can also see where I forked this from. So where my copy, my local file came from. It came from the original one.
So what we can actually do is go to the original one and start something called a pull request. So this is like a sync with central, like I said. What you could do is compare across forks because Classic John has his own. And I could say that I want to shoot some changes from mine to this one. Does that make sense?
So I need to push those changes over. I added nodes. That's all I did. I'm going to create a pull request. So now you're asking for permission to make edits. So now you're starting to control what people are changing because now you can review it.
So back over here we'll hit Refresh. This is my regular machine. And we'll see that we have one pull request open. I added nodes by Classic John from the virtual machine.
When you come into a pull request, and it'll do some audits to tell you if anything crazy's changed or malicious, and you can see that it has no real conflicts. All you did was added stuff. What you can also do is see what all files that do changed.
So I'll click on Files Changed and me, as like the Dynamo graph person who's managing them for my firm, I could see that's a lot of red and I see curly braces. So now we need to have a conversation because we're not in 2.0 yet, right?
So what you're able to do is review these changes and actually make comments and the other person would get them. I'm getting a lot of emails right now because these are both my accounts. So you can approve the changes, you can request changes, things like that. And it stays in their fork. That's what's really nice.
For this example, we're actually going to go ahead and just accept them. Because we're ready to move to 2.0, it's OK. It'll work. It'll work out. So let's scroll back up. That's a lot of changes. We'll see what all he committed. He added nodes, that's it. And I think it does require a review. Approve.
We approved them, you're cool. Let's merge it. Good to go. So now I said, oh, it's OK what you did. We'll move on. Let's do it. And I merged it. So I merged that commit. It assigns it an ID, a snapshot in time. That way I know what I did. So three change files with 469 additions and 48 deletions. It's kind of fun.
So if we go back, we can see that that's now a commit. So now I have when Classic John made the change. It was 28 seconds go, right? Very cool. What's really cool about this is now I can go backwards in time.
So let's go ahead and download those changes to my desktop. So here's the concept of fetching. So you tell it to go out and get the changes. So I fetched them and now I'm pulling them locally.
We'll notice within Dynamo if I do this, that is fun. If we do this, we get this. So with Dynamo 1.3 and 2.0, when you try to open a 2.0 graph in 1.3, you get an error that it's corrupted. And that's freaking scary, right? I'd be scared.
Some of these graphs-- we pour our hearts out into these things. Always save a png of your graph too. Just in case you can't get it open, you can rebuild it from the png, if you needed to. So that was a free tip for all y'all. That's not even in the handout.
So it tells us it's corrupted, that's not helpful. But thankfully I'm using GitHub so I know that it was migrated to JSON because they went to 2.0. So I know that. So I can click OK and then I know that I need to be on 2.0 or I can revert back.
So let's look at that real quick. So that initial upload was just the one with the template in it. You're actually able to revert that commit. So if we come down in here, we can tell it to migrate it back to where it is. Like I said, we're going to continue just building it.
And I'm going to bet you I'm not going to find it right now so we'll just move on. It's in here. There's a revert changes. I warned you all at the beginning that it's not the most intuitive software. And I'm not going to Google it in front of you.
But there is a revert changes to where you could go back. Like I said, we're going to continue so that way we can get into the script and do some other things. And see what it looks like when another user adds some nodes.
Once again, in Dynamo for Revit, you have to close Revit and reopen it whenever you're jumping between versions. That's something that hopefully gets fixed eventually to where you can just flip versions.
Back in Classic John land, we can refresh. And see that my pull request got accepted. It says merge, so I'm happy. I contributed, right? That's cool. If they were to revert it, you'd get another error that says, hey, man, do it again.
So Revit come on open and we'll look at a few things. And we'll add some nodes. Everything kind of clicking a little? The idea is to be like very baby steps. I'm not a pro at this stuff but I did save a lot of code using these processes.
So when I started publishing Rhythm as a Dynamo package I was doing the lazy backups where I had it on Google Drive and it was OK. I lost a lot of nodes at one point when I made a change to move to zero touch nodes or C# nodes.
I lost like all of Rhythm once and I had to rebuild it. And I was like, what am I doing? And I finally figured out that version controls the theme. And yeah, just do it. It was awful. It scared me to death.
I lost most of the nodes and had to rebuild them just because I overwrote stuff because Visual Studio, which is a development environment, auto saves a lot of stuff. If you've been in some of these add-in classes that are going on, you're finding that out. Version control helps that a lot.
So go Dynamo 201. And we're going to add a few more nodes. And I'm going to do Open, Ribbon Modify, and we shouldn't get that error now. And I see Classic Johns changes. That's kind of cool, right? Now we're co-authoring a Dynamo graph. Pretty cool.
So what we'll do is these nodes are from Rhythm. So if we want to document these, we can open this thing. This is another extension to be able to point out what package nodes are from.
Another thing I just wanted to show, if you're a Dynamo user, because annotating your graphs is very important. I'll say it nicer this time. I told everyone they suck if they don't annotate their graphs yesterday and they were like, he said this? Yeah.
All right, so what we'll do is these nodes are actually just a little fun. So let's go ahead and do a number slider. We'll plug this in and we'll start to turn it. And we'll hit automatic. So what's it doing? So we can actually start to screw with our ribbon. Useful, right?
So there's a debate once to where it's like, if you're making stuff that's not immediately useful when I first see it, don't do it. If you're having fun, a lot of times you figure out a lot of cool things along the way. So never stop having fun with stuff. That's kind of like a take home. If you're not having fun, sometimes it's hard to really dive into it.
But these nodes are fun to prank your co-workers to do that. Send me pictures when you get their ribbon like that. You can actually do stuff like, if they open a Dynamo graph and they haven't saved first, kink their ribbon on them. That's cool.
We'll actually add it with the other guy. So we'll hit Save on this. We'll push this change. We could see that I added a node. I wish the colors would show up. We could see that I added a double slider. This is a plus sign area, right? And this is what the double sliders descriptions are. So this is this node that I added specifically into this graph. I also removed a connector apparently.
So now we can start to see what all we've done. Really cool. Dynamo doesn't do this on its own. We're using another platform for that. I can also see that I changed some of the zoom. I changed it from manual to automatic, which should be in here somewhere. A lot of different things like that.
And then, by default, GitHub will tell you that you updated something. And then you can just describe it. Oftentimes, these are more descriptive than I'm going to be so I'll just use those.
So now I could say I added the double slider. We'll commit it and we'll push it out to the cloud. I'll verify that it went when I hit Refresh. Refresh. Refresh. That's still says initial upload. OK, there we go.
And now we'll see that I updated that graph 18 seconds ago. Back in this guy's world, we'll see that we're still in Revit and we still have the graph open, which is kind of interesting. We'll go ahead and fetch the changes from it.
Oh, I'll show you the other thing. So we'll go back to my version. So now that I have a fork, I'm going to have to do pull requests the other way as well, which is OK. And we'll hit Refresh.
So we can see that my fork for Classic John is two commits behind the other one because that guy made changes. So even your own fork starts to manage some of its stuff, which is really cool. So you can actually do a pull request in the other direction.
So if I do a new pull request, I'll pick the main repository. Compare Across Forks and pull that stuff to mine. Create Pull Requests and now I want the changes. So this would be to catch up to get those nice changes.
And we'll create a pull request and we'll merge it. It's checking right now to see if everything's fine, which it is. And we'll confirm that we'll merge it. Within GitHub, if I fetch, I should get that something's changed. So it says, hang on and I'll pull it.
So now I have those changes. I now did another sync with central, like in Revit. Back in Revit, I'll close and reopen that graph. And now it's on run automatic, it kinked my ribbon, and I see that I have that dude's changes.
Other things that this will actually do is if we add other nodes. In Dynamo 2.0, there's a node called color palette. So if you're not ready to go to Dynamo 2.0, I'm going to show you why you're ready now.
You have a color palette now. So you don't have to do color by ARGB if you've used it. Do you love using that? No. I don't either. So what we're going to do is we can pick a color. What color do we pick, everyone? Something crazy like a hot pink. There we go. And we'll plug that into our ribbon color and now yeah. Ooh, aah.
We actually use this process for something really serious, which is knowing which Revit file you're on. When you switch Revit files, we get the file path of the file. If it's on the C drive, we turn it red for our libraries. But if it's on the network, it's like a nice gray. That way, we don't update families locally and not push them to the network.
So this is like a joking fun situation, right? But it does some serious stuff if you apply it a certain way, which is kind of nice. So you could start to have graphs that do that. Especially with Revit 19 and the tab views, I find that I have a hard time knowing what model I'm in sometimes.
So if you have this running, you can start to color code your ribbon, which is kind of fun. Also just screw with it for people. You can also do Comic Sans MS and tie that into the font name. And I think it's Comic space SansMS. Ah.
I know which other one I can use. It's not working. Man, that's anticlimactic. Carl showed it yesterday. Wow. OK. That's jacked up. You're able to change the font though in short. So now we'll save that. We could push that back and pull those changes. So that's kind of that collaboration workflow as well.
I'll try to end on a high note. So we'll actually push those changes back. With GitHub, we'll see that I changed some more stuff. And we'll go ahead and update it so it changes.
Commit to Master, Push. And then we'll see that I have those changes. Now I have seven commits. Pretty cool.
You can go through a pull request again and make those changes. So now you can start to collaborate on that stuff and have all those different changes in there. Let's see if I have the right thing installed. But we'll do something kind of fun just to end it.
Let's do a color range. So within Dynamo, there's this concept of a color range. We'll end on a high note, right? I hope. With a color range, you can tell it how many colors you want. And now I have a whole list of colors, right?
There is a package out there called Firefly that has an idea of being able to do a fader that starts to iterate through things. So you can start to use this for design options as well. I'm going to use it for something less neat, or less serious.
We'll tell it to go from 0 to 20. 10,000 seems like a good amount for the time that it's going to take to run. And you're able to start to use this to do some really crazy stuff. The reason I'm doing this, because we're pretty much out of time and if everyone sees this, maybe they'll use it at their firm and tweet me or whatever for just fun.
We'll round the number up. That's what ceiling does, it rounds up. And with Firefly, you're able to change this to something called a periodic run. So now I'm getting a color by an index and I'm making it run through all of that. And we can start to do that.
What's really cool-- this is not GitHub related. What's really cool is you can actually still work in Revit while it's all tweaking on you and changing.
So as I hit Escape, it'll flip around and it's kind of fun. So if you want to freak out your co-workers, make it keep spinning and doing that. And you're like, I'm a master. This is pro-mode, you don't have that?
[LAUGHTER]
And just have it spinning like crazy. In the data set, there are some of the more serious workflows. But an interesting topic but something that can be really useful if you start to build a lot of workflows. To be able to have versions of it and be able to collaborate better.
So I hope you got something out of it, even if it's just screw with the ribbon. But thank you all for coming. This is a very odd topic and I'm glad you all did show up. So thank you.
[APPLAUSE]
Downloads
Tags
Product | |
Industries | |
Topics |