Node Library

We mentioned earlier that nodes are the core building blocks of a Dynamo graph, and they are organized into logical groups in the library. In Dynamo for Civil 3D, there are two categories (or shelves) in the library that contain dedicated nodes for working with AutoCAD and Civil 3D objects, such as Alignments, Profiles, Corridors, Block References, etc. The rest of the library contains nodes that are more generic in nature and are consistent between all "flavors" of Dynamo (for example, Dynamo for Revit, Dynamo Sandbox, etc.).

Check out the Library section for more information about how the nodes in the core Dynamo library are organized.

  1. Specific nodes for working with AutoCAD and Civil 3D objects

  2. General-purpose nodes

  3. Nodes from third-party packages that you can install separately

By using the nodes found under the AutoCAD and Civil 3D shelves, your Dynamo graph will only work in Dynamo for Civil 3D. If a Dynamo for Civil 3D graph is opened elsewhere (in Dynamo for Revit, for example), these nodes will be flagged with a warning and will not run.

Why are there two separate shelves for AutoCAD and Civil 3D?

This organization distinguishes the nodes for native AutoCAD objects (Lines, Polylines, Block References, etc.) from the nodes for Civil 3D objects (Alignments, Corridors, Surfaces, etc.). And from a technical standpoint, AutoCAD and Civil 3D are two separate things - AutoCAD is the base application, and Civil 3D is built on top of it.

Node Hierarchy

In order to work with the AutoCAD and Civil 3D nodes, it's important to have a solid understanding of the object hierarchy within each shelf. Remember the taxonomy from Biology? Kingdom, Phylum, Class, Order, Family, Genus, Species? AutoCAD and Civil 3D objects are categorized in a similar manner. Let's work through some examples to explain.

Civil Objects

Let's use an Alignment as an example.

Say your goal is to change the name of the Alignment. From here, the next node you would add is a CivilObject.SetName node.

At first, this may not seem very intuitive. What is a CivilObject, and why does the library not have an Alignment.SetName node? The answer is related to reusability and simplicity. If you think about it, the process of changing the name of a Civil 3D object is the same whether the object is an Alignment, Corridor, Profile, or something else. So instead of having repetitive nodes that essentially all do the same thing (e.g., Alignment.SetName, Corridor.SetName, Profile.SetName, etc.), it would make sense to wrap up that functionality into a single node. That's exactly what CivilObject.SetName does!

Another way to think about this is in terms of relationships. An Alignment and a Corridor are both types of Civil Objects, just like an apple and a pear are both types of fruit. Civil Object nodes apply to any type of Civil Object, just like you might want to use a single peeler for peeling both an apple and a pear. Your kitchen would get pretty messy if you had a separate peeler for every type of fruit! In that sense, the Dynamo node library is just like your kitchen.

Objects

Now, let's take this one step further. Say you want to change the layer of the Alignment. The node you would use is the Object.SetLayer node.

Why isn't there a node called CivilObject.SetLayer? The same principles of reusability and simplicity that we discussed earlier apply here. The layer property is something that is common to any object in AutoCAD that can be drawn or inserted, such a Line, Polyline, Text, Block Reference, etc. Civil 3D objects like Alignments and Corridors fall under the same category, and so any node that applies to an Object can also be used with any Civil Object.

Last updated