Dynamo is an open source graphical programming tool for design that extends Revit with the data and logic environment of an easy to use graphical recipe editor.
T:\Automations\Dynamo
Graphs are named for what they do and what they do it to.
Examples:
204_Create_Model_Structural Wall Between Floors
210_Delete_View_Unused View Templates
.210_Export_Annotation_Revision Narrative Export
Classification 1
. = preffix classification with "." ONLY if prepared for Dynamo Player. If no prefix of "." exists graph is not intended for Dynamo Player.
21 = works with Revit 2021
23 = works with Revit 2023
Classification 2
Management_
Create_
Delete_
Modify_
Import _
Export_
Classification 3
None_
Data_
Model_ = 3D, System Families (walls, floors,ect...), Families, Mass, Rooms, Areas, Spaces
Annotation_ = 2D, Text, Tags, symbols, Lines, Filled Regions, Revision Data
View _ = Views, Sheets, View Templates
Links_
Imports_
Systems_ = Beam systems
Class 4
Description
FAID has a graphical standard for Dynamo. This color grouping of Dynamo nodes organizes the graph (working area of Dynamo) into easy to understand functional areas.
Data Input = a source of more than a single input stored outside of Dynamo.
User Input = a source of a single input from within Dynamo.
Generic Grouped Function = functional nodes
Output = The result or goal of the function, likely sent to Revit or Excel
Optional Flow = Often when working in Dynamo a number of possible means of achieving the same thing are created. We recommend keeping the alternative flow and freezing it so it will not run. We find this useful for others trying to adapt or improve existing graphs.
Packages are like addins for Dynamo. Packages are created by users like you and shared locally with colleagues or with the world via the Dynamo Package Manager. Packages may contain a single node or a full library of nodes that you can use in your own Dynamo definitions.
If a Graph uses custom Packages it must be available for reference to the computer. For this reason, FAID stores a number of useful packages on our local serves to aid in ensuring Dynamo graphs will work.
If you build a graph with a custom node not currently in our shared repository of Packages please contact the BIM Manager to have the Package added to our repository.
Always try to avoid the use of Packages when possible.
Below is template for how to organize Python Nodes in Dynamo for consistency and ease of use for other as well as those learning.
########################################Reference Links
"""
clr Common Language Runtime = https://docs.microsoft.com/en-us/dotnet/standard/clr
Library = Name https://www.Link.com/
###FIX### = FIX is an indication of where futuer inprovement can be made.
"""
########################################Load libraries
import clr # Microsoft .NET
clr.AddReference('Reference') # Description:
from Something.Something import Something # Description:
########################################Global variables/ Constants
Variable = Class.Method.Property # Description:
#----------External Inputs
########################################GlobalSubFunction:
def globalFunction(): # Description:
"""In: __ Out: """ # Description: docstring
#----------
def globalFunction(): # Description:
"""In: __ Out: """ # Description: docstring
########################################Class
#------------------------------------------------------------#Method Name
function # Description:
"""In: __ Out: """ # docstring
#------------------------------------------------------------#Method Name
function # Description:
"""In: __ Out: """ # docstring
#----------
subfunction # Description:
"""In: __ Out: """ # docstring
########################################OUT
OUT = variable
To access Type paramters in Dynamo you can not pass (revit object) elements into the element input. Rather you must pass the Type/ id element of the object.
Example:
Try Element.Name > WallTpe.ByName (or other type node) > Element.GetParamterValueByname
Designscript is a textual syntax used in lieu of Dynamo Nodes through Code blocks.
List.Create List1 = (List2, List3);
List Lacing (shortest, longest or cross product) = forum.dynamobim.com/t/lacing-in-codeblocks-setparameterbyname/21302/4
(List@-2<2>)
List
@-2 @-Level of nested list
<1> Lacing Shortest / <2> Lacing Longest / <3> Lacing Longest also called cross product
List.GetItemAtIndex List1 = List.GetItemAtIndex(List2, Index#);
To get an Item from a singular list you can use a Code Block with the following syntax a = [#] # is the position of the item.
Dynamo tracks dropdown selection by the index of the version of Dynamo. Each version of Dynamo has a different number of categories available. This means the index numbers are different in each version, and when a Dynamo graph is opened in another version, the selection in the drop-down is lost. Try Category.ByName or a code block with design script as shown
Built-in Category OST Prefix - What does it stand for
Almost all the built-in category enum values come equipped with an “OST_” prefix.
OST_ it is short for “O” bject “ST” yle.
For a list of BuiltInCategory Enumerations
https://www.revitapidocs.com/2019/ba1c5b30-242f-5fdc-8ea9-ec3b61e6e722.htm