The Small Triumphs of Scripting in the Design Studio

B Birdsell
5 min readMay 7, 2019

A twist on the normal educational Dynamo post, what follows are some descriptions of my favourite Dynamo nodes.

Dynamo workspace

Get Item At Index

This basic node has come to my aid many times as I try to reverse engineer the output from another node during the debugging process. Sometimes when the output from a node is a large nested array this can take some effort, and this is where this node comes in handy. It can grab one part of the outputted list for further exploration. Another feature of this node is its a role in building up complex lists as it can be combined with other functions to create a procedurally generated lists form other inputs. This helps ensure a script generalizes to a wide range of input configurations than would otherwise be possible.

An example of complex lacing accomplished with the GetItemAtIndex node.

Object Type

Years ago I didn’t even know this node existed, but as my skills developed and the types of problems I encountered changed, this node has become indispensable for figuring out what type of input is really needed. It can be infuriating to the neophyte programmer that even when all input values for node seem correct nothing is returned. Troubleshooting the issue, it’s often discovered that the node is expecting only a very certain type of value. This behaviour is rooted in the object-oriented programming language used behind-the-scenes to power Dynamo and Revit. Since Dynamo works on top of this more abstract code, having a tool like IsType around can make this relationship more transparent.

Axonometric View By Vector

I knew right away when I first saw Dynamo that I wanted to use some of its tools to make GIFs of my 3D building models because I’ve long been convinced of GIFs power to communicate broadly. Though there is some abstract math involved in getting this method up and running, the Axonometric view By Eye Point And Target (and similar nodes) are a great way to quickly accomplish communicative 3D renderings for all sorts of unique spatial relationships.

Disallow Joins for Structural Members

Creating complex geometry in Dynamo and then effortlessly placing tons of steel in REVIT is one of the great joys of learning to program. However, standalone Dynamo has some weird opinions about how to automatically connect structural framing joints. This can cause automatically placed structural framing to look unfinished and non-uniform if one doesn’t go in behind the script in Revit and post-process by-hand all the structural joints that connected haphazardly. This is exactly the sort of repetitive behaviour that computation is great at supporting. By happy chance a member of the public finally got around to creating a third party node which links into the Revit API and forces structural members to stay unconnected, giving the final rendering a uniformed professional look.

Though subtle online, it’s clear when sitting in front of these files all day.

List Map

The List Map node represents a classic computer science concept that simply maps a function over a list. It’s very basic in principle, but is responsible for much of the complexity seen in computer programs, and feels like magic when weld competently against a problem. With recent upgrades, this functionally is now built-in to most Dynamo nodes, but I continue to use the node format because I appreciate the clarity its use brings to any script.

Tool.RunMe

Discovering this node and finding a situation requiring its use signifies that a script has probably advanced from simple to complex. Programming is an interesting pursuit because its complexity doesn’t scale linearly with additional lines of code. Even if the script only gets a few lines longer, it can become significantly more complex in that space. To manage some of this complexity in development and execution is the RunMe node. In the development phase, it can be used as a toggle to turn off/on the execution of whole branches of the code as the user investigates a particular issue, eliminating the need to run the entire script again and again which can be costly depending on the computation. In production, the node can be introduced as part of error checking logic to, for example, keep good data from being overridden or execute more complex logic only when certain conditions are met. This node is an excellent way to increase the intelligence of your dynamo scripts.

Helper function

Bonus!

Dictionary

In an effort to encourage readers to challenge themselves, this is a node I haven’t used much previously, but am determined to use more of in 2019. Though this functionality has other names in other programming languages, keyword-value associations in Dynamo are an excellent way to capture relationships between elements that would otherwise need to be configured as elaborate if-then nested logic trees. As above, it’s the use of nodes like these that can really increase the intelligent behaviour displayed in your scripts.

— — — — — — — —

Blair Birdsell is a design technologist in Vancouver, B.C. Please feel free to connect up on LinkedIn or check out another article about scripting and Dynamo.

--

--

B Birdsell

The Perfect Architecture Company. Design, Engineering, 3D Printing, Sustainability, and BIM.