설명
주요 학습
- Get inspired about the possibilities of custom workflows available with Revit, Dynamo, and Dynamo Player Extension for Revit
- Learn how to apply scripts used throughout this session for real-world scenarios
- Learn how to share Dynamo scripts with colleagues who don't have much scripting experience
- Learn how to make the most of the current Dynamo Player extension for Revit features
발표자
- MPMasha PekurovskyMasha Pekurovsky holds a Bachelor of Architecture degree from Technion–Israel Institute of Technology and a Master of Science degree in architecture from Pratt Institute. She specializes in Building Information Modeling (BIM) implementation and computational design workflows, bringing more than 10 years of professional experience in residential, educational, commercial, and institutional projects. Pekurovsky leads in-house Revit software training, provides project consultations, and participates in the development of firm-wide standards, resources, and strategies.
MASHA PEKUROVSKY: All right, good afternoon, everybody. Hello. My name is Masha Pekurovsky. And welcome to Winning In Revit With Dynamo Player. Thank you very much for being here this afternoon.
If you just walked into the room, please join somebody else. We're doing a partner buddy system on the computers. So you'll be kindly asked to share the workstation.
I'm going to introduce the class in just a minute. But before I do that, there are just a few short announcements about the workstations that we're using during this lab. Is this anybody's first lab today? No say you.
All right, wonderful. We're using super awesome new cutting edge technology. It's called Frame. And the application that you see running is running in the browser, in the Google Chrome browser.
What it means is that if you click Escape a lot, it's going to close that window. To bring it back, you have to click F11, right? And if you are used to doing Alt Tab to toggle through your Revit windows, that functionality is not going to work all that well.
So try not to. If you have Tab and you get something weird, don't worry about it. We'll help you. Just please keep in mind that you are using an awesome cutting edge technology that allows to run a virtual machine inside your Google Chrome browser. Am I selling this too much? Uh-oh.
OK. I would like to introduce our lab assistants for today. Please welcome my dream team, John Pierson in the back, known as a 60SecondRevit, Dzan, and Josh. You can look. They're in the back.
If you have any question whatsoever during the lab, please raise your hand. Look back, grab their attention. They will be able to help you. Hopefully, you will not need that. But who knows, right?
OK. Now, just a few minutes before we started this lab, we walked around and we collected business cards or notes with your name if you would like to participate in the raffle. The raffle lottery is going to be at the end of the class. And the prize is six months free subscription to Black Spectacles software learning.
You don't have to participate, but a class titled Winning In Revit ought to have a raffle. So if you would like to put your name in, you can do that sometime later in the class. We'll walk around. Yeah. OK. Thank you very much, Josh.
AUDIENCE: [INAUDIBLE]
MASHA PEKUROVSKY: You can-- yeah. I'll take this. Right. Thank you so much. We are not going to use your information to contact you or anything like that. This is just for the fun of it. OK.
Thank you very much. Thanks. Now, we're going to get started in just another minute. But before we will, I would like to invite you to stand up and find the person or to pair up in threes, which is an odd thing to say.
And share a one skill that you learned recently, new skill that you learned. Just think about it. It can be anything. I will go ahead. I will share my story.
I recently moved to Seattle. And my boyfriend he's a big outdoors guy. And so he got me to go hiking.
And I had to learn how to use the sticks that you see me holding in the picture. So please stand up, find two people to share. So you have two minutes-- new skill that you learned recently.
[INTERPOSING VOICES]
MASHA PEKUROVSKY: Thank you so much. [INAUDIBLE] All right, thank you. Thank you. We will continue. Guys, all right.
Thank you so much to talking to your fellow neighbors in the lab. We will now get going. So if you learned a new skill recently, you know that it takes a little bit of effort, maybe more than a little bit of effort to acquire a new skill.
And what you are doing today is you are getting introduced to a new skill set with Dynamo and Dynamo Player. Now, here on the screen we have inspirational quotes about winning and what it means to some leaders and the public figures in the past, just quotes that I selected. So, winning is my favorite.
"Winning is half of it. Having fun is the other half." So you guys are here learning you are already winning at this Autodesk University thing. And now we're going to have some fun with learning something new.
So this class is about being more productive today than you were yesterday, right, taking it one step at a time, learning something new, getting more efficient with Revit and your day to day work. As We'll get into the lab thing in a few minutes. And you will see that the class is based for you to experience how to use Dynamo, how to use Dynamo Player.
OK. So you will find Dynamo and Dynamo Player in the Revit Manage tab. And now is a great time to open up Revit. We will be working with the Revit 2018. To be more specific, it's Revit 2018.2.
So please find-- it's going to be Start, open up Revit. And it will take it a few seconds to open up. So I'll continue talking as Revit opens up and we get situated here. I'm going to give you a bit of history about Dynamo Player.
So Dynamo Player got introduced last year. Actually, it was a few weeks before last Autodesk University that Autodesk released Dynamo Player as part of Revit 2017.3 I think. And that's how it looked like in 2017. This is still how Dynamo Player looks like in Revit 2017.2.
And the concept of Dynamo Player is that you look at the Dynamo script, and you don't really look at it. You play it from outside. So you click Play. And the entire Dynamo script executes.
You don't have to look at the wires. You don't have to do any of the under the hood set up. You just click Play, it plays. You get your thing done. Everybody's happy. You go home early.
And then the Dynamo community, when this was introduced last year, went back to Autodesk and they said, well, but we need user inputs. And we want to be able to interact with the script. And so throughout the last year, Autodesk did a lot of development work.
And what we will be looking at today is Dynamo Player in Revit 2018.1 I and 0.2. When I started working on the data set for this class, it was Dynamo Player and Revit 2018.1. But now, we have Revit 2018.2. So it's the same Dynamo Player for both Revit versions.
So what's new in Dynamo Player in '18? A bunch of user input, and that's the topic of our class. So if you look at the user interface, it looks about the same, except that there is this one tiny user interface button that gets added. That's the properties for the user interface.
So what does this mean for us? We'll look at the black box, the black box that is the Dynamo script. And now, we have windows or openings into that script. So you can tap into user inputs that you or your colleague previously set up.
So Dynamo Player sits on top of Dynamo script and allows you to interact with the Dynamo script in a way that was set up. So it helps if you know Dynamo to work with Dynamo player. And we'll go back and forth about this throughout the class.
So this is an example of interaction diagram Dynamo Player extension for Revit 2018.1 and 0.2. Right, so in this class, I'm going to stop saying the 0.1, 0.2, doesn't matter-- Dynamo Player for Revit '18. OK. So this is a list of the user inputs that Dynamo Player allows you to interact with.
You don't have to remember this list. Dynamo is going to help you with that. Because all of these nodes that you are seeing now on the screen are set to be input by default. So you put in the dropdown, Node in Dynamo. It's automatically an input.
You don't have to do anything special. You have to do something special to disable it to be an input. And sometimes it's an issue when you're designing scripts. We'll talk about that.
So all of these scripts that you are seeing on the screen, all of these are inputs by default in Dynamo and Dynamo Player. Now, for output, what do we have for output? We just have to Watch node.
The Watch node comes at the very end. It's an additional. So by itself, if you run a Dynamo script and there is the result, Dynamo Player is not going to know to show you that result unless you set it up. as an output with the Watch node.
And something that you will see throughout this lab is that I renamed the Watch nodes Calculation Result. How are you guys doing on opening Revit '18? Are we doing OK? Yes? Revit '18 is open? All right, thank you very much.
So we're going to learn how to interact with the Dynamo Player scripts that were prepackaged. We are not going to do real time scripting, unless we have to fix or adjust a script. And we'll see what that means.
All right, so very important question-- what controls the order of inputs and outputs, right? Because when you click on that tiny icon that got added in 2018, you will see this dropdown thing that shows you inputs and outputs. So what controls the order of what is input, what is output?
So there are two things that contribute to that. And one thing is the order in which the nodes were created. So you created this input node first. Is going to be first on the dropdown. You see the Select Model Element? It gets to be first.
Now, that's one contributor. Another contributor is the input versus output. Dynamo Player is going to prioritize inputs on top of outputs. So if you have three Watch nodes, it's going to put it at the bottom of the interface. And the order is going to be the order in which these Watch nodes were created.
Kind of makes sense, right? It can be little bit annoying when you are trying to get a certain user experience. You have to go back, copy, paste, fix it, to just get the look that you want for the stuff. But that's part of the deal. That's part of learning how to design for Dynamo Player.
So here's an example of a script that we're going to try in just a few minutes. And here we're seeing that there is an input element selection node. And what is getting scripted now is another branch that will allow you to select multiple elements. And in a second, we're going to see how it looks like with Dynamo Player.
And you see that I like to rename my output nodes to Calculation Results. It can be any other word as long as it is consistent with your practice and something that makes sense for your team or your group of people. And now, we're going to see how this looks like in Dynamo Player.
As you can see, the inputs are on top. The outputs are towards the end of the interface. And that's the output. That's the Watch node. If you don't include a Watch node, you are not going to see any of this. Maybe that's what you intend to have.
All right, now somewhere on the Dynamo universe blog thing, I found this entry that somebody posted that you can actually go behind the scenes, find this text file, and manually add the order of nodes to kind of hack it. I didn't try it. But you guys are welcome to try.
I find it easier to just copy, paste, edit the things in the order in which I want to see. I like the more tactile approach. But just so you know, this does exist out there in the multiverse.
OK. So the exercises that we're going to do are by topic. And there are five cluster topics that we're going to talk about. We're going to do an introduction. Then we're going to look at data mining, so extracting data from Revit and putting data back into Revit, so Revit to Excel stuff.
Then we're going to look at view-based workflows. Dynamo Player is amazing for that. Because you can open a view and run a script that is view specific. And you can do that time after time with ease, because you don't have to don't open Dynamo or anything like that. You can be super productive with that.
And then we're going to look at the combined UI. We're going to look at animated GIFs and custom prompt windows and dialog boxes. That's a lot of fun. And towards the end of the class, we're going to look at form and how to design with families and form in Revit.
And this is the data set. Now, you are going to find the data set on your computer. So let's go ahead, and let's find the data set for this class. Please open the C drive. On the C drive, you are going to see a short cut to something called Datasets.
Then inside Datasets, you're going to find the folder with my name, Masha Pekurovsky. And inside that folder, you're going to see the data set. Yes? If you are using your personal computer and you have Revit '18.2 and Dynamo Player installed, you can get the data set to your computer. And Josh has the key for that.
Josh has the USB drive for that. We'll pass that around if you would like it. Everybody else, yes, you found the lab Dataset? Fantastic, great.
So for this, I'm going to toggle off to Revit. And we are going to use-- there we go. That's Yeah. you guys are still seeing my presentation, right? OK.
So in Revit, we are going to open the Revit Advanced Sample Project. If you don't see on the screen what I'm seeing right here, you can find this sample file by going to File, Open, Sample Files. And then once this thing shows up--
AUDIENCE: I have a question.
MASHA PEKUROVSKY: Yes, question.
AUDIENCE: When you renaming the node just for organization, and you need to [INAUDIBLE], can you find out [INAUDIBLE] that node is rather than just copying [INAUDIBLE]?
MASHA PEKUROVSKY: OK. Let me repeat. There was a question that I would like to repeat for everybody. The question was what happens when you rename a node? Can you still see what the original node was?
You can derive what the original node was based on information that that node is producing. So in Output mode, the Watch node is easily recognizable in Dynamo. Because it is going to have the information stream from your Dynamo script result calculation.
OK. So this is the file we're going to be working with, our AC Advanced Sample Project. And here it is. And we open the file. And when we open the file, please go to the site floorplan-- so floorplans, site floorplan.
AUDIENCE: Where is the sample file?
MASHA PEKUROVSKY: The sample file is under-- it's under File, Sample. Or it should be open on your-- thank you so much. All set? Yeah, thanks.
AUDIENCE: Oh
MASHA PEKUROVSKY: File, Open, Sample Files. OK. And please open this Site One. All right, the next thing we're going to do here-- thank you very much for helping out.
So next thing we're going to do here is we're going to find Dynamo Player. Remember, that's the second or third slide I showed about how to find Dynamo in Dynamo Player. In the Revit 2018, the two applications migrated to Manage.
It used to be in a different place back in Revit '15, '16, '17. So Manage tab-- look all the way to the right. And the very last icon there, that's Dynamo Player. That's the topic of this class.
OK. So with Dynamo Player open, one other thing we're going to do really quick is we're going to connect custom packages in Dynamo. So go ahead and also fire up Dynamo. That's all the work already, OK?
Somebody set this up here. So here, we're going to path custom packages. And guys, this is the most important moment in the beginning of this class, super important.
I need everybody to look at the screen. Look under Settings. And then click on Manage Node and Package Path. And the next thing we're going to do here is you're going to click Plus, except for the guys right here. I think you guys should be good, yeah? Because I tested it on your computer before the class.
So you are going to click on C. Then you are going to navigate to the shortcut to Datasets. Then you are going to find Masha Pekurovsky.
And then you're going to click on the Custom Dynamo Packages. And the path should look something like this. And when this is done, you can say Accept the Changes. OK?
Say Accept Changes. Now, the next thing we're going to do is we're just going to double check that the custom packages got loaded in. This is the super important moment for us. Because if something didn't work, then we need to fix it now before we continue.
So click on File, New, or Control O. And you should see something like this. Let's look for Clockwork. See if Clockwork is available for you in Custom Packages. You should have a bunch of stuff trickle in. Yes?
[INTERPOSING VOICES]
MASHA PEKUROVSKY: All right. All right, if you have a question about that, if something didn't work, please raise your hand quietly, so we can continue with the class. Before you open Dynamo, right, we are searching for Datasets, Masha Pekurovsky, Custom Packages, OK? You got that?
AUDIENCE: What--
MASHA PEKUROVSKY: Ah, Custom Package that we were searching for was Clockwork, just to see that you have a bunch of custom packages there. All right, OK. It looks like we're all set. This is fantastic. OK.
So here is one important thing that you guys need to learn about Dynamo and Dynamo Player. You can run Dynamo and have Dynamo Player open. All right, so you can run Dynamo definitions, and at the same time, have the Dynamo Player open.
You cannot do it the other way around. So if you want to work with Dynamo Player and run script from Dynamo Player, you need to close off Dynamo. OK? So this is what we're going to do.
Next, we're going to close Dynamo. And we're going to start looking closer at the Dynamo Player. So first thing we're going to do here is we're going to browse to the class Dataset, so browse the folder.
And here, again, you need to go to C, Datasets, Masha Pekurovsky. And we're going to point to the 01 Introduction folder. And we're going to say OK.
And the next thing we're going to do is we're going to click on this Recycle Refresh button to refresh the data set. The Refresh button is going to refresh any values that you set up for your Dynamo Player script. If you click on the Refresh, it's going to refresh the values.
So we're going to look at the first script. So click on the Properties Dialogue button. The icon for Properties. And we saw a recording of the script just a few minutes ago.
So there are two inputs right here. There is Select Model Element and Select Model Elements. So for the Select Model Element, please click Select. And then select one item.
And you will see that once the item is selected, you see the element number ID. And then for the next input item, click on Select Model Elements. And you can select however many items you would like.
And you will see that now there are many more items selected. Now, as you guys know in Revit, each Revit element that you have in your model gets an ID number, kind of like a Social Security number for Revit elements. So next, we're going to click on Play. And we're going to see what happens.
And what happens here is the output information, the Watch nodes, are showing us information from the elements that got selected. And you will see that the elements are organized based on element category and the element number. So this output is from that first selection, the one element that you selected.
And this next window of output is for all the other gazillion elements that you selected. So now if you would like to get Dynamo Player to forget all the selections, you just click on the Refresh button. And you will see that it will drop all the selections.
All right, now we're going to go to the second-- and in Revit, go ahead and please unselect the items that you selected. You can do so by clicking escape within Revit. OK. So the next thing we're going to do here is we are going to start asking our Revit model some questions about what is inside the model.
And we're going to look at model categories. Now, in Revit and BIM, the model is organized based on modeling categories. So you can go ahead and click Play to play the Dynamo Player script. And you will see that the script is outputting a calculation of how many rooms are in the project.
And you can go ahead, and you can choose any other category that makes sense. So for example, Furniture or Columns. And you will see that if you type, let's say, the letter C, it will take you to all the categories starting with the letter C. So I'll say Ceilings.
OK. And you'll see my spelling here is a little bit odd. Oh, maybe not. So there are 65 ceiling elements in this model.
Yeah. The spelling is OK. But let me show you how Dynamo Player knows to output this information for you. So to look at behind the scenes of Dynamo Player to look at the actual script, we're going to click on the Pencil icon. And when you hover over the Pencil item, you will see that it says Edit In Dynamo.
And Dynamo is going to open up the actual script. OK. Now, another thing you will see in this Dataset-- we're not going to open all the files that we have for this class. But when you go home and you look at the data set for this class, you will see that the files have an organizational structure.
And the organizational structure is that there is an Overview color block that will tell you when the script was created, give you some very basic description. And it's also going to tell you what custom packages were used in the script. Then you will see that there is color coding for input, design, and output.
So input are incoming stuff that we want to look at. So in this case, the input is rooms or a category that we are reviewing from a model. Then you'll see that I use design grouping and color green to the cluster together these Dynamo steps, kind of the procedure steps, that the script is doing.
And what we're doing here is we're counting the number of room elements, right? So we're counting. And then we're putting that information into a sentence that reports how many room items are in the project.
So here it is. This is kind of packaging it all together. And the x and the y are probably not the best way to represent this.
So instead of x, we could say room category count. And instead of y, we could have said-- so y is the count. And x is the-- no. x is the count. And y is the name of the category.
You can be more detailed, less detailed with that. So if you run the script from inside, now you will see that this is kind of how the magic happens in the background. Now you also see that I am doing an if statement here to figure out if there are no elements in the room, or if there are no elements in the model or if, you know, something to fix the text to get it to make more sense.
All right, so we can close the Dynamo script. And don't save changes. And you can refresh this. And let's pick up a category of elements that does not exist in this file.
OK. One thing that you will notice with Dynamo Player, my Revit went behind the scenes. And now I have PowerPoint. But Dynamo Player window is still on the top. It has this thing that just doesn't go away.
It's a good thing. It's very stable. That's what it is about. OK. So maybe let's select Parking and click Play.
Oh, there are parking elements. OK. Let's pick something that we don't have.
[INTERPOSING VOICES]
MASHA PEKUROVSKY: What?
AUDIENCE: Sprinklers.
MASHA PEKUROVSKY: Sprinklers, all right. OK. OK, Sprinkler tags. I want to show you what happens when the value is null.
So the value null means zero, null values. So that thing that we looked at, the logic, the if statement, it was analyzing to see if the value equals zero. And if the value equals zero, it gives you this nice output that says zero items.
OK. Why would you need to use this in real life? Well, maybe you wanted to query your model. And maybe you would be surprised that you have parking elements in your model, right, as we just saw on the screen.
OK. Let's go onto the next script, Reporting Type. Now, type in Revit is different than a category. And let me give you some examples. So a phase in Revit is a type.
And so if you try to access phase information from categories, it's not going to make any sense. You have to call out for the type in the Revit model to get access to information about phases. Now, another example is area schemes. So please, go ahead and find where it says Area Scheme. And click Play again.
And you'll see that now that it reports what area schemes exist in the model. Now, the element type thing is a bit more finicky than the category. The concept is slightly different than the category.
So for example, if I were to select Area instead of Area Scheme, and I run the script, the results that I get don't make sense. It says null. OK. Maybe let's select something else.
Ceiling, let's select Ceiling. We know that the Ceiling is a category. We just looked at this. We just counted Ceilings in the previous script.
So why do we have the option to select Ceilings in type? That OK. So here, it tells you that there are 65 ceilings in the model.
But then the calculation result looks a little bit odd. And the reason for that is because ceilings are Category elements. They're not type elements.
And so their information is going to look a bit odd. So just because you can run a script in Dynamo Player, doesn't necessarily mean that the information is correct. So this is a bit of a slippery slope with Dynamo player is that you need to know what it is you're going to do with Dynamo Player and what is the purpose of the script.
OK. So the next thing we're going to do here, we are going to apply a scope box to a 3D view. And for that, we'll need to create a scope box. Scope boxes in Revit exist, so that you can manage your floor plans and sections in an organized manner.
So let's go ahead, and let's create a scope box. And I'll keep talking about what they are and how we use them. So View, Scope Box. And please go ahead and create a scope box. All right, so Scope Box will help will help you to manage your drawings and plan to help them keep consistent cropping. OK.
And when you create a scope box, you can rename if you feel so inclined. You can rename the scope box. But I'm going to keep this scope box named Scope Box 1. And if you rename it, if you end up renaming it, please change the text here, so that it matches.
All right, and you can run the script from 3D View Or you can run the script from the Floorplan View It doesn't matter. The result is going to be that this scope box is going to become the section bounding box in 3D View, in that view.
All right, so I'm going to run this in Floorplan. And when I go to my 3D view, there it is. Now, if I go ahead and I change this and I re-run the script, you will see that the scope box adjusts in size.
Now, you might have seen Revit add-ons that do something like this. And you can argue that once your Dynamo and Dynamo Player script becomes mature, and this is something that you like to do a lot, then it graduates on the way to be a Revit add-on. OK. How do guys like this? OK to use? Easy, right?
OK. You get to take this home to use on your projects. Now, let's say you work for this, and you got what you needed. And you did your 3D views and all of that. How do you get your Revit file to forget about this experience?
You can go to the Properties. And please find the Section Box check box, and you can uncheck the Section Box. And it goes back to having no Section Box on this 3D View.
Now, the script for B cropped the view by Element Bounding box is going to crop a view based on an element. So go ahead and select an element. And then click Run.
And you will see so this is that. And click Play. And you will see that I'm looking at this wall right here. I guess the next question would be how to apply a Section Crop Box to a bunch of elements.
It's possible, but it takes more time for Dynamo to calculate. And it will depend on how many elements you are asking Dynamo to compute to be one box. So the task is a bit more challenging computationally. It's possible, but I'm not sure I would recommend doing that.
Now, you will see that this wall that we see this element that got cropped, it also has the shading elements attached to it. And so you are getting that entitlement with the host element on that. And again, if you want to go back, if you want to-- well, first of all, you can undo in Revit. And that will take you back. Or you can do that Unchecked Section Box thing, and that works as well.
All right, now, we're going to go to back to the Side view. And the way you know that you are in the Floorplan Side View is that you have this property line that goes around your building. This is the property line.
When you select it, it's going to tell you it is the property line in the Properties dialog box. And we're going to go to the Dashboard, to the Properties dialog box for Dynamo Player. And we're going to select the property line.
And when you select the property line, we're going to click on the Tab key once, so that we hover over. maybe closer and click on the Tab key once, so that you get the entire parameter selected, the entire parameter. And click left click. And then click Play.
And this will give you a boundary area and a project unit system. Now, you will see that the boundary area calculation here gets outputted in hectares. Because that's the site measurement units for metric.
If you would like to change the units, you can go to Manage Project units. If you do this, now if you're following me to change the units of the project, were going to go back and change it back. So here, you just need to change the length to Fit and Fractional Inches. And rerun the script, and you'll see that the information changes to be in imperial and acres.
[INTERPOSING VOICES]
MASHA PEKUROVSKY: All right, I am hearing some noise across the room. What questions? No? All right, no questions. So we're going to continue to the second part, all right.
OK. So just quickly to review what we just did, the examples for the introduction, we selected Elements Well, first of all, we [INAUDIBLE] Custom Packages. We selected Elements.
We looked at the order of how things show up in the Dynamo Player. We looked at how to put together an output calculation. Logic we looked at applying the scope box through 3D View.
The scripts 04A and 04B are using a custom node from [INAUDIBLE], custom Dynamo package that John put together, very great, good custom package. I recommend that. And then we also looked at this a bit more sophisticated script that calculates the property area and drives what units are being used.
OK. So for this next chapter, we're going to talk about getting information from Revit to Excel. And there is really a lot you can do with that. This cluster of scripts is using custom package called the Bumblebee.
And you will see that there is a toggle for True or False to output information into Excel. And so we will be looking for Excel in just a moment on your computers in the lab. So the first exercise we're going to do is we're going to output rooms.
Then the next thing we're going to do is we're going to do kind of a bigger report with a bit more custom data. Then we are going to write information from Excel back to Revit. It can be very helpful for interior finishes or other information you want to put in.
And then our last exercise for this cluster is to look at what I call matrix output, where you get this type of calculation kind of level and broom. And you get the dial of how many rooms of this name exist on what floor. All right, so to tap into these scripts and to get the data set, we're going to click on Browse Through Folder.
And then we're going to navigate to Data to the Data folder and say OK. And we're going to go to script 01A. And we're also going to open Excel, because we will be writing information to Excel.
Now, I like to do this type of functionality with an open Excel file. So it's like instant gratification. You have an open Excel file in front of you.
You click a button. You see information trickle in, feels great. And it's also helpful for the lab. It's more instant.
So this is how your script should look like. This is how your screen should look like. You should have open Excel window. And this toggle should be set to True.
This is going to be the name of the sheet in Excel. And this is going to be the origin cell. And let's go ahead, and let's change this to A1.
A1 is going to be this cell at the very top left corner, right? And then we're going to click on Play. Now, let's see what happens.
So here, this script was set up to output all unique room names in this project. Now, if let's say I want to change the name of this spreadsheet in Excel, I can tell it something else. [INAUDIBLE] and Play again. And you will see it's going to create a new tab in Excel. Is this working for anybody?
AUDIENCE: Yup.
MASHA PEKUROVSKY: Yes. OK. All right, good. So this is very simple, right? Maybe you would want to use this to help you it is simple in terms of simplistic, right? You are not getting a lot of information. You're just getting one list of all the unique rooms that you have in your project.
Now, for this next script, we're going to open up a template that I saved for this class. And to do that, actually, don't go to the Script just yet. Let's open the folder.
So click on View Current Folder. And that's going to take you to the lab data set. And this is going to take you to the folder where all the Dynamo scripts are saved. And there is a template, a Revit template that's called Program Reporting.
So please go ahead and open that file. And go ahead and save this file to the desktop. You don't have to save this to the desktop. We're not doing this lab here again.
But if you don't save this template to another location, you're going to override the template. And the purpose of the template is so that you keep an empty template, right? So here we have an Excel template.
And you will see that the script that we're going to run is going to deposit information in four places, OK? So place number one, we're going to report all the rooms and model. And we're going to count-- this as a second place. So G1 is going to be the second place.
Then we're going to also list all the rooms that are not placed and count those. And then we're also going to explore information about levels. Now, if you feel adventurous today, and probably some of you do feel adventurous, please go ahead and place some rooms outside just floating.
I would never suggest that you do that in a normal Revit training, but just for the sake of this exercise. OK. Just please make sure that you exit the placement command, right? When you run Dynamo, make sure that you are not concurrently running any Revit operations or anything like that.
So here, open the Excel template and click. In here, we can look at the properties. And make sure that the toggle is set to Excel. And click OK and Run. And here it is.
We have information about rooms. Now, check this out. You see the Department column is empty. The Department column is empty, because these objects that we have in the project don't have any department value information in it. So it's empty.
Now, this approach is fantastic. Because you can mine your Revit file on a daily basis, on a weekly basis, whatever you need to get the information for. The way that this spreadsheet is formatted, if you take out the very first row, you can feed this list to power BI or tableau for visualization purposes. And so I've been doing a lot of that work over the past few years.
OK. We can close this file now. And we're going to look at the other example of taking information from an Excel file and depositing this information into a Revit model. So also, in this folder that we looked at a few minutes ago, the 02 Data folder, there is an Excel spreadsheet called Room Finishes.
Now, if you look at how I named some of these finishes, you can clearly say I'm not an interior designer. So you are welcome to come in and change or add information. And when you do that, please go ahead and save this file. I'm going to make some changes here.
All right, and save. All right, so here we have a new type of input. We have an input for file path. So this input is the link to this Room Finishes Excel file that we have open in front of us. You can go ahead, you can close this Excel file.
So we're going to click on Browse. And we should browse to the location where this data set is saved. I don't know if you can copy, paste the path. But please make sure that you are looking at the Room Finishes file.
And you will see that here I have input for which sheet to read from. And I'm just double checking that it also says here Unique Rooms. right? So Unique Rooms here, Unique Rooms here. We're going to start reading from A1.
OK. Looks good. And go ahead, and you can run the script. And now this script is going to populate information into the entire Revit model. And the script is looking at pairing up room name with the finishes that you are associated with that room.
OK. And to double check that it worked for us, we're going to go through the Schedules part on project browser. And please find where it says Room Finish Schedule. And you should see information populated in Base, Floor, Wall, and so forth.
Now, what happened here? So the list that we had from Room Finishes, it was like a keyed schedule in a way that you only had the unique rooms with the respective finishes for, like, a template room. And then that information got deposited into whatever repeating rooms I had.
So here, for example, I have my Library room or the Lobby room or the Administration room. That's the room name, right? And so the script was looking based on the room name and saying, OK, which one is instruction?
OK. Instruction occurs 10 times. Deposit information into all the Instruction named rooms. This is something helpful in daily practice that you can maybe use.
All right, the next two scripts that we're going to run are the matrix output scripts. And I prefer to run scripts from a floorplan or a 3D view. But for these specific scripts, it doesn't matter. You can have any view open, even a Schedule view or anything.
And again, you can have an Excel file. You just need to have an Excel file open. And I want to show guys something here.
Go ahead and toggle the Export to Excel Toggle to False. Just go ahead and do that for a second. all right. And what you're going to see here is that it says Round Completed. Obviously, no information got outputted to Excel.
But the calculation result says Set Round [INAUDIBLE] To True, right? So the output result is giving you advice what to do next. It's nice, right?
OK. So here, the script is using Bumblebee. And that's a feature of Bumblebee. That's the output. It tells you if your toggle is set to False.
So now, go ahead and toggle this to True and set this to Run. And you will see that there is a word success. Success, all right.
So what we are seeing here in front of us is a level elevation value, then level name, than admin. So these are the room names, every single room that you have in your project with the number of rooms with that name per floor. So how can this be useful? This can be useful for residential projects or health care projects or anything that has a repeating program that you need to keep tabs on really.
Now, another really nice thing that I like about the script is you can use this script for rooms and areas. So the next thing we're going to do, we're going to change this to Areas. Areas And then make sure to change the Excel sheet name.
Now, you see there that I say 32 symbols. What will happen if your name of the Excel sheet thing is longer than 32 symbols? Excel is going to close on itself. It's not going to work.
Why is that? I googled that. I learned it from the web. Excel sheet tab names cannot be longer than 32 characters-- fun fact. Now, you know.
All right, so please change the name. It Can be whatever you want. It can include symbols, character, whatever you really want, as long as it's no longer than 32 symbols.
How do you know it's longer? The script doesn't work. Something crashes. That's how you know usually.
So this is the output for Areas. Now, those of you who have a bit more experience with Revit know that areas can be from different area schemes. So if you have more than one area scheme, you would need to add the additional filter inside the script to dial into that information.
OK, last script here. It's a similar script, but the information we're outputting is areas. So it's going to do something very similar to this. But instead of cones, we're going to have areas.
So here we go. And here you can see that I was not consistent with how I was naming this. So program AREAS, I used all caps. So now, you can start to pair up this information if you wanted to, right?
You have your area count. And you have the count of how many times this element exists. in this model. And you can start to look at the information side by side.
All right, we're now going to look at the next module, the view specific workflow. And I need to give you a bit of background information on some of the behind the scenes techniques that were used for the scripts that we just looked at. So the matrix scripts that we just looked at are using the list match component from Clockwork to do the computational work to connect things together.
And that work started from me getting a request from a team in Shanghai back when I was [INAUDIBLE] team. I wanted to translate their drawings through Chinese. Because half of the team was only English speaking, and they were spending a lot of time translating.
And so they had this Excel file with 100 values or whatever, 200 dictionary values. And the program would be, let's say, 100 values from that, 200 value list or 1,000 value list. And they wanted to translate the words that they had.
And so this became very useful. This computational technique was useful for that, because you can, say, look at the values that they want to translate, and then look at the dictionary, compare the two, and connect the dots. All right, so this is how it looked like.
So this is the behind the scenes of how we are able to pair up the rooms by level, and the count, and the areas. That one node is behind the scenes of a lot of this functionality. Now, in view, the view specific scripts, as I like to call them, are scripts that look at only one floorplan or a ceiling plan.
And it's a really helpful thing computationally. Because you're not asking Dynamo to look at the entire model. You're only asking Dynamo to look at elements on one level or in one elevation or one area plan.
You're only looking at this one kind of set of information right in front of you. And so it makes the calculation more accurate and also faster. And with Dynamo Player, you can really go from view to view, click on Play, Play, Play, and populate information based on different plans and different maybe elevations, area plans, and so on.
So you will see that kind of the first step is to filter out the elements that we want to look at. The second step is to start to pair up the information that we need to pair up. So let's go ahead, and let's open the Ceiling View.
And we're going to run the script for two ceiling floorplans that we have here. So 01 entry level and the 02 floor. Oh we can also do the 03 floor. So just go ahead, and you can see what's going on inside.
But what's happening in the script is that the ceilings-- so we're looking at all the ceilings. And the ceilings are looking to the closest room where they're at. And if you are used to modeling in Revit, you know ceilings are usually attached to or modeled above a room.
But ceilings don't natively connect to rooms. So your room objects are not really seeing the ceiling object. And so if you wanted to exchange information between the two objects natively in Revit, you don't have that feature, right?
Now, with Dynamo Player and Dynamo, you can set this up to be computationally. So you can connect the two elements, discover each other, and exchange information. If you run this script from inside Dynamo-- actually, let me do that for this third floorplan.
I'm just going to open this. And you will see that they connect. points. Now, how do you know that it worked? You can open the room schedule. And see that information from ceilings got populated. OK.
Now, something I wanted to mention is that the information that I'm getting from ceilings to deposit back into rooms is information about type name. You can choose this to be a key, type key, or type mark. But here, I don't have my type marks.
Looks like it didn't quite run the way expected. I'm not sure if our room's on the third floor. So maybe that's why. Let's check the room.
Now, if you look at the room finish schedule, you will see that now we also have information about ceilings. Now, what you are also going to see is that the room numbers start from the number two. What this hints is that there is a filter applied to the schedule.
So if you click on Filter and go to Filter By Level, you can set this to None to remove the filter, so that now you can see all the information from the entire project. And so you can see that even though the schedule was hidden, the information there and information got populated. All right, did it work for you guys? Yes? It exchanged information?
OK, good. So I would like to suggest that you can really start doing a lot with Dynamo Player and Dynamo based on views and kind of starting to connect elements that are not natively connected in Revit with this type of proximity calculation to get the elements to discover each other. Now I really want for us to cover the other two clusters.
And I don't want for us to run out of time. So let's move on to the 04 combined UI cluster. And here, we're going to talk about combining Dynamo Player with additional prompt windows or pop-up dialogue features from other custom packages.
All right, so please make sure that you connected to 04 combined UI. I came up with this name, because you have Dynamo Player, and you will also will have Windows that pop up. And so the first few scripts are not using any custom packages.
There was a custom Python node inside that actually borrowed from out of the box Autodesk Dynamo Player example. So go ahead and click on the Change room name to all upper case. OK. We can do the first one.
So there should be two scripts, upper case, and upper case final. Let's try the final script. OK. So that's [INAUDIBLE]. Oh, that's for area name, sorry.
Please go into the interface and change the areas to rooms. It looks like I saved that. Do you guys have the script, yes? It ends with the word final. Yup. Yup.
There we go. So the prompt, that was reporting back to you that there were so many room objects. And it did this operation of making old room names upper case. And before that, it was for areas.
Now, this particular operation was not view-specific. It made this change for your entire program and your entire project. So all the rooms in the project got changed. And you can see that if you go to that room finish schedule. You'll see that all of your entire program is upper case.
If you also wanted to make it at all lowercase, that's easy to do. Mixed case is a bit more challenging. But again, this is just an example of an operation that you can do for an entire project and interact with the parameter of rooms.
OK. Let's try the script 02A. And now, this is more for, I guess, BIM management purposes or BIM cleanup purposes. Do you guys know what imported line patterns are in Revit?
AUDIENCE: They're evil.
MASHA PEKUROVSKY: They're evil. All right, great. Great advice here. All right, so basically if you go to Additional Settings and you look at Line Patterns, and if you scroll down, you scroll down, you see gazillion of these imported line patterns. This is an indication that people on your team have been bringing information from AutoCAD, importing information from AutoCAD.
And these items are not liked in the BIM management communities, because they can corrupt the database to some great extent. And so it would be nice to have a way to automatically delete all of these imported line patterns. Because natively in the Revit, can only go and delete them one by one. And you would need to listen to a lot of good music to do that.
And it's a huge, tremendous, waste of time, honestly. So there is this Dynamo script. There are also a bunch of Revit add-ons out there that do this type of functionality to get rid of these scripts. But if you don't have access to that add-on, Dynamo and Dynamo Player make it super easy.
So here, OK, job, you have successfully deleted seven imported DWG line patterns. Now, I no longer have these imported line patterns. Please run the script again, and see what it tells you. Keep up the awesome work. No imported line patterns in file, right?
So the way the Dynamo Player decides what to show you is based on calculation result. The script goes and asks the Revit file how many line patterns with the word imported do I have, and tells you. If more than zero, delete, if zero, say, keep up the awesome work-- simple logic.
OK. Next up, let's take a look at delete imported line patterns from CAD with advanced UI feature. So let's go ahead. We can open this.
And so you can see that in this example, the Dynamo Player is kind of almost in the background. We're not really using any input stuff, right? And so here, proceed.
Now, this dialogue box is using the data shapes custom package. And there is not much to do, right? There is not much to delete. But I want to show another.
You can do Undo, where you get all of these imported line patterns back. And please run the script again. And here's a bit of a tricky moment.
Once you click Execute Dynamo Script, you said go. And there is no really way for you to undo this Dynamo script halfway. You can undo the operation afterwards. But you can not stop the operation once it started.
You can do that with custom scripting and custom Revit add-ins, but not so much with Dynamo. Dynamo-- go, go do the [INAUDIBLE] thing. If you want to undo, click Undo. All right, so we don't really have much choice. Proceed.
Let me show you guys something here. If you would like to follow, you are welcome to. There is a feature that comes with the window to cancel. OK.
So there is a Cancel button. So you could say cancel here. I just want to show you the functionality. And I want to show you that even though you can have this, it's not really going to do much, right?
So I have my Cancel button here. But this button is meaningless. Because Dynamo is still going to execute what it was set to execute, right?
Now, the behind the scenes, the UI multiple input form, it looks like a stacked up thing. It has a bunch of stuff. But it's actually really easy to use.
Now, the image that we saw right there, there is this logo image for the class that I used. And there is an image that it points to. It's optional. And you can use the scripts from the class as an example to set it up.
OK. Now, because I did that, I made this change to a Dynamo script, now Dynamo Player is alerting me that there was a change. So what do I do here? Click Refresh. And it's going to catch up on itself.
All right, OK, now let's take a look at inputting a file that's an animated GIF. And please, the Dynamo Player script is 04 data shapes GIF. And we're going to browse through different files in just a moment.
But please go ahead and click Play, and you will see that this Data Shapes window is pointing to an animated GIF. As I pointed out previously, the Cancel is not going to do much. It is what it is, right?
But you can kind of unreference that and say, OK. Well, nice GIF, all right. Now, if you would like, there is a library of several other GIFs. So if you would like to go to the combined UI animated GIFs, there are a bunch of things here. And you can go ahead and-- I got these GIFs from the online GIF library.
Out of five GIFs that I downloaded, one was corrupt and didn't work. But I was able to [INAUDIBLE] them before the class. All right, now let me show you an example when you would use something like this.
AUDIENCE: [INAUDIBLE]
MASHA PEKUROVSKY: Just for fun, yes. I heard that. OK. So the next example we're going to do, we're going to query a Warnings file, which is an HTML file, as you know, from Revit. And we're going to query that Warning file. And we're going to output results into an Excel file, so that we can continue looking at the warnings.
And to do that, we are going to use a prepared template. So we're going to output stuff into a template. So the folder 04 Combined UI has the HTML file with the warnings. The warnings are from this project.
And there is also the Warnings Report template. So please go ahead and open the Warnings Report template. And at the same time, you can go ahead-- I'm going to put this to set toggle to False, just so I have some time to go to where I need to go, find the data set.
Again, the folder is 04 Combined UI. And this is the HTML file. And you can set this to run. And then I can set this to through. And you'll see that it will output the analysis.
And, you know, I customize it for a way to, first of all, have a part where I look at all the unique warnings and to give me an overall count of what type of warnings I have. But then next to this, the column E onwards, this is the itemized list of warnings or elements that participate and contribute to warnings. And the yellow cells, C1 and J1, are the summary total for that.
All right, we're almost starting to run out of time. I am just going to mention a few things. We're not really going to be able to run this. This is the one node script sync to central, just one node.
You can take a look at this at home. And you can use this script to synchronize to central. And it's great, because it works with regular files and [INAUDIBLE] our hosted files equally efficiently. And you can set your dials through [INAUDIBLE]. One click does the sync to central for you-- a place to put comments and everything.
OK. Modeling-- all right, we're probably going to do just one example that use scripts, so we have time to do a raffle and maybe question. OK. I'm going to show you what the scripts are. And then we're going to do the number two place family and rotate along curve.
OK. This is the combined UI portion. All right, so form. So kind of my spiel on form and getting form information to be in Revit is that you wish there would be an easy button, but there really isn't.
But you can make things simple if you can describe your task to be kind of a simple one sentence thing. And the challenge really, taking geometry and putting geometry into Revit, is that you need to tell the geometry what category it is, what's [INAUDIBLE] category, what level it goes to, what material.
And so there is this additional information in Revit that you need to add to geometries. And the exercise that I prepared for us to do is to create a mass from a geometry, so an exercise that takes the geometry and creates a Revit mass from that.
That's the video from that. You select the type of family that you would like to create. And you get your conceptual mass created. And then you can create floors and so forth.
This is the example-- guys, I'm sorry. We're really out of time here. We're going to run through the examples, then we'll do the raffle and questions. So this is the example to place families with rotation.
If you did the beginners computational workshop yesterday, we were placing trees on a curve. But this is with a rotation that is local. The element's going to rotate itself relative to the curve-- very helpful if you're doing seating arrangements and whatnot. Here's the video that shows this.
So it's going to adjust things along a curve. And if you need to flip them, just some sample Space Bar away. Another example here is animating values.
This was created with a custom package called Dynanimator. And this package was made two years ago. But now with Dynamo Player, it's like this package is getting a new life. Because it is so easy to set up parameters to automate and output images.
So the way this works is you select an element. You select the parameter to go from one value to another value. You set the number of iterations in between. And the script outputs these images that you can then show or combine or use for design creation.
And the last example, this script is very simple, but I actually use this a bunch of times in real life. And it saves so much time that I couldn't not share this. This can be done with an AutoCAD file via Rhino, a Rhino file.
But the exercise here is let's say you get information from the site survey points or point information that you need to check with your Revit model. You can extract this information with a simple query of XYZ coordinates. Put that information into a CSV file, and then bring this as a typography into Revit. And the data set has these files.
So just some final closing thoughts here-- Dynamo Player is the best thing that happened to Dynamo. Because we just had this awesome class. And you guys managed to do all of these exciting things. And it was super easy, right?
And also, Dynamo Player requires some familiarity with Dynamo. So you can consume scripts that Dynamo Superuser prepared for you. But if you want to go deeper into this, it really helps to know some Dynamo.
And I also mentioned this, but you can run Dynamo while Dynamo Player is open, but not the other way around. And a warning message in Dynamo Player may or may not be an issue. So this is something that you learned.
All right, raffle lottery-- Josh can you do the honors of pulling up the winner name? And questions-- guys, if you have questions, now is the time.
JOSH MOORE: [INAUDIBLE]?
AUDIENCE: You must be present to win.
MASHA PEKUROVSKY: Oh, there we go. All right, wonderful. Thank you very much.
[APPLAUSE]