Back

Introduction to Dynamo for Customization

With the last few releases of AutoCAD® Civil 3D®, Autodesk gave users the ability to manipulate the software in unconventional ways. Some options should directly impact the way we think about our work, while others can simply make the experience of using the software better. In this article I’d like to talk about one of those called Dynamo.

Dynamo

It’s difficult to estimate the impact of Dynamo will have, but for me it’s a ground shaker. I spent the last 20 years diving into the customization realm of Autodesk software to simplify my life. After years of tears I’ve finally built a decent foundation and can accomplish most of what I want. Dynamo came in and smashed that foundation to tiny little grains of sand. Let me try to explain.

Programming is all about optimization, scalability, reusability, and speed. Despite our best efforts to achieve this, there is almost always something certain to interrupt the effort and break the process. This causes a constant urge to rewrite while weighing the options if a bug is big enough to warrant such a task, or is something we can learn to live with and work around.

To clarify, in most cases, we write code for CAD in a way that can be used across multiple routines. This intertwines them. When a user, boss, or client asks for that specific portion of a program to be reconfigured, say for scalability or to be shared in different environments, this can require tearing out portions of the code and force rewrite (which involves an entirely new level of debugging, testing, QA/QC). Because these lines of code are embedded across multiple routines, the prospect of accomplishing this seems agonizing.

Think of it as human DNA. The DNA is stranded together, but if we simply rip out chunks of it, the system is more likely going to break down completely than ever being repaired.

Additionally, without diving into the API, users have few options to customize their production. They rely on online tools or they outsource to individuals unfamiliar with their production environments and teams. This is enough, but subpar in my opinion. The users inside the company have far more experience facing issues in design and production than outside consultants ever will. Makes sense, right? Users are in the trenches every day of the year. They troubleshoot, design, train, and manage all at the same time.

To me, Dynamo proves to be a unique tool to provide solutions for both situations. First, the node-based solution with connectors allows users to attach and remove changes on the fly to test and troubleshoot as needed. This means users can plug and play with the various nodes until they eventually solve some of their more complex production problems. This might seem complex, but it is virtually no different than a child’s game such as Minecraft. In the game, children connect blocks of materials (wires) and when they press the appropriate switch those connectors cause a reaction. If children can accomplish this, there is no reason users can’t as well.

Second, as a programmer I can focus on building nodes that accomplish specific tasks, rather than entire pieces of code. Users can begin to think of their tasks differently, and instead of asking for code that will solve one unique problem, they can begin to consider the steps that might be in common with other situations and simply request a node be constructed to solve that step.

This way, users and programmers become a team, and Dynamo can be used to connect them in a new way. For example, a user might want a node that would offset a selected line a designated number of spaces. The designer realizes the same concept could apply to columns, trees, or anything else. The designer knows the spaces will vary and wants to be able to input varying numbers and distance conditions at the same time. So, the designer asks the programmer to provide a node that will assist him. I won’t lie, for me to program this could be a real pain. The varying inputs can provide a unique challenge with coding. Dynamo nodes provide simple and quick solutions to this. It will simply take all the users’ input, regardless of how many there are, and implement them as the designer sees fit.

See Figure 1 for an example of custom nodes used in conjunction with the standard Dynamo nodes to offset polylines any number of distances desired.

Figure 1: Dynamo example

One last note: Dynamo allows us to connect multiple applications to each other at the same time. For example, I’ve constructed a node system that will take Excel data and update a drawing simultaneously based on the input on the Excel sheet. I can’t wrap my head around all this yet, but I know it’s incredible.

Brian Chapman is an Autodesk Authorized Developer, Digital Artist, and a Senior Designer for an engineering firm located in Las Vegas, Nevada. Brian shares tips and tricks at procad.blog with a portfolio of digital artwork and renderings at emptypawn.com. He can be reached at procadman@pro-cad.net.

Appears in these Categories

Back