Before I start I do want to say that I'm not experience coder nor a software engineer and I was able to make this post....So don't let those words like "Code writing" and "Scripting" scare you. Sometimes people can get held up over one or two words they feel as negative. One could say that Microsoft's Visual Basic and Autodesk's Dynamo has similar traits when it comes to it being both programs the process code to generated an output for whatever input was there at the time and/or vis versa...But that's it! Really thou, that's the only thing that is similar between the two programs and this is mainly due to the fact Dynamo is a visual programing program to where VBA is not. Without going too far into the whole history of computer programming, I'm going to go ahead ans just assume that you have the knowledge of the basic operations of the interface and such. If you feel the need you want to read more into Dynamo and what it is or what it could actually be used for please visit www.DynamoBIM.org . (Download the DynamoPrimer from their website...its very handy!)
**using software: Revit 2016/Dynamo 1.1.0.2094 **
**Real Life Problem:
Your an MEP Designer and your working on the spaces in your model but just realize that the architect just updated the rooms names/numbers. Due to the lack of options Revit does not have a clean way to pulling parameters info and/or linking info.
In other words: My space Name/Number and Room Name/Number no longer match the architectural room names and numbers due to the linking problem that revit has with Rooms and Spaces.
**Real Life Answer:
Let's start!
Step One:
Open your Autodesk's Revit MEP project file (ex_file: revitMEP2015_ivblog_1.rvt). Once you have you model open lets go to a 3D view and then navigate to the Manage Tab on the main Ribbon toolbar(see figure 2.1). Dynamo is an open-source platform which constantly puts new builds every other month now almost. As stated above, I'm running Revit 2016 - Dynamo 1.1.0.2094 (today's date 10/18/2016-Im currently a build behind) .
Add-In's Tab > Dynamo 1.1.0.2094 (figure 2.1) |
Create, Actions and Query (figure 2.2) |
Scroll down to the group Revit Node Group and select the drop-down arrow to expand the Revit Sub-groups and it contents. (see figure 2.3)
(figure 2.3) |
Step Three:
Within the Revit Node library group, expand the Selection Node group. We need to add the following nodes to our graph with a simple double-click: Categories and All Elements of Categories.
(figure 2.4) |
Once Categories and All Elements of Categories are thrown on the graph re-arrange them correctly for proper data flow. Category is wired to Category on All Elements of Category(see below for correct connection.-figure 2.5)
(figure 2.5) |
All Elements of Category: While the first node(Category) gets you to the category, "All Elements of Categories" will then select all the Revit objects within the chosen categories and in our case we will now generate a list of elements for the output.
Once you collect all the spaces and a list is thrown out the output of one node's "Elements". A list with all the spaces in your selected Revit project. Now that we have all the spaces listed out in one list, we can then move to our next step. Which will be taking this new generated list and add a node to the workflow so we can extract data from those elements.
Step Four:
This step will start the extraction process of data that you will also manipulate within the same node just a different inlet port on the "Element.SetParameterByName" node. Adding two (2) new nodes to the graph; "Element.SetParameterByName" and "Code Block". In quick terminology the Code Block node is a node that allows the user to input Dynamo's preferred program language; Design Script. Then The Element.SetParameterByName node has three inlet ports(Element, ParameterName & Value) and one outlet port(Element).
Element.SetParameterByName: This node has three inlets(3) - the top port takes Revit elements of any builtin category. Then the middle port is where you specify a parameter name, this parameterName would be found within that previous selected element(Case-sensitive).
Code Block: A node which has a input text box field, inside this text box will allow you to write anything under the DesignScript Handbook Dynamo's preferred language
Element.GetParameterValueByName: Just like Element.SetParameterByName this node will querry data on the parameter of an element. With only two(2) inlet ports one to get what element is chosen and parameterName inlet port gets the Value of that parameter name you provide within this port.
See below screen shot of how these nodes with be structured...
Once you have wired up all the correct nodes in your graph and finalized your script its time to hit RUN in the bottom-left-hand corner.
Sample File.DYN Here!!
Please come back soon for i will be adding a lot more content as we move into the winter months!! So KEEP IN TOUCH!
Thanks for the follow, please stay-in touch for their will be a lot more content being posted especially on parametric design (things like Dynamo, Revit API, Use of Parameters and so much more its exciting!!
Cheers!
Mickael Leedom Renaud
duaner.ekim@gmail.com
Downtown Los Angeles, CA 90017
Mechanical Design Engineer
ParsonsBrinckerhoff|WSP
Michae
No comments:
Post a Comment