Civil 3D Toolkit Dynamo
Civil 3D Toolkit Dynamo
Learning Objectives
• Be familiarized and use Civil 3D Toolkit.
• Create simple and re-usable routine.
• Navigate and debug your Dynamo graph.
• Create your own automation routine.
Description
This class will provide basic to intermediate understanding of Civil 3D Toolkit package in
Dynamo for Civil 3D. Learn how to leverage Civil 3D Toolkit in solving basic to complex Dynamo
graph.
Speaker
Jowenn is an Implementation Consultant at Autodesk. He holds a B.S. Civil
Engineering degree from De La Salle University and MBA degree from
Ateneo De Manila University. He has over 16 years industry experience in
design and construction. He is highly skilled in Civil 3D, Dynamo and
Subassembly composer. He provides technical workflow solutions, mentoring
and consulting. Major projects he handled previously includes Sydney Metro
TSE, SVC and OTS, Ballina Bypass Pacific Highway, Brisbane Airport Link
Northern Busway Tender Design, Gerringong Upgrade Princess Highway and
Rozelle Interchange WestConnex. | Autodesk Expert Elite Alumni | 2016 Autodesk Gunslinger
Sydney, Australia | 2018 Civil Infrastructure Inside the Factory Potsdam, Germany | 2020 Land
Development Inside the Factory New Hampshire, USA
Page 1
Introduction to Civil 3D Toolkit package in Civil 3D
Civil 3D Toolkit is a package created inside Dynamo for Civil 3D (D4C3D). Dynamo is a visual
programming application that can automate tasks in Civil 3D. It is an open sourced graphical
tool for design and documentation. It is a visual interface used to create logical flow of routines
and used to manipulate data and generate geometry. Civil 3D Toolkit was developed to
supplement the out of the box nodes and provided enhancement capability that is not available
in the current version.
Figure 1.1: Dynamo for Civil 3D via manage tab in the Ribbon
Step 2
In Dynamo, go to Packages tab and search for Civil3DToolkit
Page 2
Where to find Civil 3D Toolkit?
Once you downloaded and install the latest Civil 3D toolkit, you can see the package in the
library side below Add-Ons and will have the name Autodesk. In the drop down, you can see
Civil3DToolkit.
Where do I start?
It is ideal to use Civil 3D Toolkit if you already understand the basic principle of Dynamo and
know how to use this. If you need some Dynamo refresher, visit https://primer.Dynamobim.org/
to give you a strong foundation on Dynamo basics. After that, you can visit the Civil 3D Toolkit
feedback thread and start reading from community feedbacks and learn from sample routine
provided by the community. https://forum.Dynamobim.com/t/civil-3d-toolkit-feedback-
thread/43570
It is also important to know the basic functionality of Civil 3D for you to be able to leverage the
power of Dynamo and the enhancement that comes with the toolkit. Start with small routines like
selecting an object or converting geometry from Dynamo to Civil 3D and vice versa. Once you
are comfortable with the tool start making simple re-usable routine.
Page 3
How to check your Civil 3D Toolkit version?
If you already have installed the Civil 3D Toolkit and want to check what is your current toolkit
version, go to Packages tab and select Manage Packages then you will see beside the package
name the current version installed in your Dynamo.
Page 4
AutoCAD & Civil 3D Categories
Civil 3D Toolkit offers a wide range of subcategories. The two most commonly used categories
in the toolkit would be AutoCAD and Civil 3D. Although we will not tackle each nodes available,
we will use some of the nodes here to create our simple and re-usable routines later on.
Figure 1.7: AutoCAD & Civil 3D subcategories in Civil 3D Toolkit as of version 1.1.10
Page 5
Other Task Specific Categories
Civil 3D Toolkit have other major categories such as Collaboration, GIS, LandDevelopment,
PipeNetworks, PressurePipeNetworks and Tunnel.
For Collaboration, you can find nodes related to BIM360, Forge and Photo.
For GIS, you can find nodes related to Map and Object data.
For LandDevelopment, you can find nodes related to Site, Parcel, Featurelines and Cogo pts.
Page 6
For PipeNetworks, you can find nodes related to Network, Pipe, Part and Structure.
For PressurePipeNetworks, you can find nodes related to Pipe, Fitting, Appurtenance and
Networks.
For Tunnel, you can find nodes related to Ring, RingType and RingSegment.
Page 7
Create simple and re-usable routine
When building your Dynamo graph archives, it is very important to focus on making graphs that
is scalable and reusable. Making smaller graphs that you can share with team members to learn
and re-use will make Dynamo learning a lot easier.
Page 8
Other nodes inside DocumentExtensions also provides valuable impact to your efficiency. You
can get and set the civil object styles. You can get the object handle and the object using that
handle. You can also get information like coordinate system code, xrefs used and layout tabs.
Page 9
Civil 3D Toolkit > AutoCAD > Arc
Converting Dynamo Arc geometry to Civil 3D geometry has been a challenge for many Dynamo
users in the past. Using the Civil 3D Toolkit, you will be able to convert the Dynamo arc
geometry to Civil 3D.
Figure 2.2.A: Sample Arc geometry not converting to CAD using Object.ByGeometry
Page 10
In Figure 2.2.C Instead of creating ArcByThreePoints inside Dynamo, the toolkit will allow you to
build the geometry directly to CAD.
Converting Arc from CAD to Dynamo using Object.Geometry is not implemented. Using the
toolkit will allow you to convert the CAD object and convert it to Arc before the Object.Geometry
will be able to recognize the object. Alternatively, you can also use the Arc.Geometry which will
create the arc in Dynamo.
Figure 2.3: Select object and Select objects that allows multiple selections in Civil 3D
Page 11
Civil 3D Toolkit > AutoCAD > Hatch
The toolkit also provides some enhancement with hatch. The Hatch.ByObject returns a hatch
from an autocad hatch object which allows us to get information like rotation, scale, pattern and
even geometry as polycurve boundary of the hatch.
Figure 2.4.A: Selecting CAD hatch and using Hatch.ByObject to get the hatch information
Figure 2.4.B: Selecting CAD closed region & using Hatch.ByGeometry to assign hatch then set the color
Page 12
Civil 3D Toolkit > AutoCAD > BlockReferenceExtensions
Ability to add block reference has been part of our day to day CAD work in the past. Inserting
the block to the exact location using Dynamo in a very efficient way is ground breaking. It
eliminates human error and provides fast and accurate way of inserting a block. Toolkit
enhancement provides user to create block reference in CAD using Dynamo geometry.
Figure 2.5.C: Assign hyperlink to a block reference and Get the insertion point, name and block objects
Page 13
Figure 2.5.D: Gets the block reference of the dynamic block
Figure 2.6: Creates a layer in CAD if layer exists it assign the color
Page 14
Civil 3D Toolkit > AutoCAD > LineExtensions
Toolkit has LineExtensions.ByGeometry. This can be used to convert Dynamo line to CAD line
instead of the using Object.ByGeometry that requires layer and block as input.
Figure 2.9: Convert Dynamo curve to CAD polyline with Arc using PolylineExtensions.ByGeometry
Page 15
Civil 3D Toolkit > AutoCAD > ObjectExtensions
Object extensions can add extra information to AutoCAD objects. In Civil 3D, you can select an
object and press Ctrl+1 to see the properties. In the Extended Data tab of your properties, you
can see Documentation with Hyperlink, Notes and Reference documents. You can use the
object extensions to add those information to AutoCAD objects.
You can also add XData to AutoCAD object. If you select an AutoCAD and type XDLIST, you
can see if there are data associated with the object you selected. You can use object extension
to add and remove XData to AutoCAD object.
Page 16
You can get and set the parameters of Civil Object that have parameters assigned like pipes and
structures.
Page 17
Civil 3D Toolkit > AutoCAD > LegendItem
LegendItem nodes are needed for you to create Items inside a Legend.
Figure 2.11.B: Adding the 1st 10 layers as LegendItem inside a Legend in a blank drawing
Page 18
Civil 3D Toolkit > AutoCAD > Viewport
Viewport are object that display views of the model space. You create, scale and place them in
paper space on a layout. In Viewport, you can switch between model space (MSPACE) and
paper space (PSPACE). Alternatively, you can use tilemode 1 and 0 to switch between Model
and Layout.
Figure 2.12.D: Converting viewport boundary to model space geometry using Option 1 & 2
Page 19
Figure 2.12.E: Viewport nodes available
Page 20
Civil 3D Toolkit > AutoCAD > Table
AutoCAD table is an object that contains information arranged in rows and columns. Table
styles control the default settings and definition of each table cells.
Figure 2.14.A: Get the data of the selected ACAD table using Table.ByObject and Table.Data
Figure 2.14.B: Table.ByPointData creates ACAD Table from list of data and insertion point
Figure 2.14.C: Change value & style using Table.SetValueByRowColumn, and other Table.Set nodes
Page 21
Civil 3D Toolkit > Civil3D > AlignmentExtensions
Alignment is one of the most important parts of your design and having the ability to create an
alignment in Dynamo will open so many possibilities.
Page 22
Figure 3.1.C: AlignmentExtensions.SampleLineByStation
Page 23
Figure 3.1.F: AlignmentExtensions.AddProfileByName and AddProfileBySurface
Figure 3.1.G: Leveraging AlignmentEntities to add Fixed line, Float curve and Float line
Page 24
Civil 3D Toolkit > Civil3D > AlignmentExtensions > AlignmentSubEntity
You can leverage the AlignmentSubEntity and use the toolkit nodes to mine the data available
in each sub-entity.
Page 25
Civil 3D Toolkit > Civil3D > CorridorExtensions > TkCorridorFeatureLine
After using CorridorExtensions nodes, we can connect it to TkFeatureLine nodes to get data or
to create geometry.
Page 26
Figure 3.2.F: TkCorridorFeatureLine.ExportAsAlignment
The TkCorridorFeatureLine Export nodes can export the point code of a baseline. You need to
be careful in exporting which point code to choose. In Figure 3.2.D, you can export all polylines
without an issue as it will create all individual corridor featureline in correct 3D polylines. In
Figure 3.2.E, it is recommended to choose only specific point code to export. Keep in mind that
Featureline in the same site will overwrite the same Featureline if they have the same easting
and northing even if they have differenent elevation. Figure 3.2.F requires specific point codes
as you don’t want to have alignments on the same location multiple times.
Page 27
Figure 3.3.B: ADSK_New_Profile created using ProfileExtensions.AddPVI
Page 28
It is important to note that in some cases, due to Civil 3D rounding, the alignment start and end
stations may not show an exact whole number. Instead of seeing station 700, you may
encounter it as station 699.999999999. Adjusting the increment and tolerance values will help
find a better output. Increment is for horizontal station interval while tolerance is for the vertical
elevation tolerance.
Figure 3.3.E: ProfileExtensions getting ProfileEntities, PVIs, HighLowPoints, Min & Max Elevation
Figure 3.3.F: Get current alignment Profile Entities and Profile Entity data
Page 29
Civil 3D Toolkit > Civil3D > ProfileView
If you have alignment and profile, next step is to create the profile view. Toolkit has nodes that
can create profile view from alignment and insertion point.
Figure 3.4.B: New profile created at Insertion Point 0,0,0 and Station Elevation 0+20 & 60 @ XY 40 & 20
Page 30
Civil 3D Toolkit > Civil3D > PVI
Getting PVI’s data such as Type, Station, Elevation, GradeIn and GradeOut are valuable
information for your design. Toolkit also has nodes for getting PVI sight distance.
Figure 3.5: Get current alignment profile PVI’s and PVI data
Figure 3.6: Get Current Section View data and Offset Elevation -18.08 & 70.01 @ XY 1230 & 200
Page 31
Civil 3D Toolkit > Civil3D > Selection
Selecting Civil 3D object name using drop down option is available in the toolkit for Surface,
Alignment and Corridor Names.
Figure 3.7: Selection to get Surface, Alignment and Corridor Names available in current drawing
Page 32
Figure 3.8.B: Options in creating solids from surface using TinSurfaceExtensions.CreateSolids
Page 33
Figure 3.8.D: TinSurfaceExtensions.GetMesh & Extract nodes
Page 34
Tips to navigate and debug your Dynamo graph
It is important to know how to navigate and debug an existing graph. As the team develops their
skills in Dynamo, they will start creating simple to complex routines. In some cases, you will
encounter properly annotated graphs and sometimes there’s no annotation or groupings at all.
Whatever state you receive a graph, observe 3 simple steps to navigate and debug the graphs
easily.
Analyze
When navigating an existing graph, always open the graph in manual execution mode. It is
important to analyze what is the purpose of this graph, what are the inputs needed and what are
the outputs.
Understand
After knowing the purpose of the existing graph, check if clustering and grouping is already
available and if it’s not available, then start by grouping them. Breaking the graph through
freezing nodes is a good way to focus on portion of a graph at a time. After you understand
what they do, start adding Dynamo notes (Ctrl+W) to make the graph more human readable.
The key to the success of this process is to structure the nodes with groupings and run the
graph step by step.
Modify
Understanding the goal of the graph will help you see what you need to modify. Checking the
inputs and outputs, understanding the error messages and adding graph annotations are parts
of modifying an existing graph. Learning each nodes that are being used and understanding
what they do is important in modifying an existing graph. Look for ways to make the graph as
efficient as possible. When you see your graph having so many groups of nodes and it is doing
the same tasks, then chances are, proper list management will make this more efficient.
Page 35
Tips in creating your own automation routine
The most challenging part is to find which tasks to automate. There are many repetitive design
tasks and identifying what to automate and how to automate them will rely on how many re-
usable routines you manage to learn and create. It is also important for you to learn which tasks
are worth spending time with. Always ask yourself if making this automation routine will be
measurable and scalable. Will it save you some time in the future? Will it be useful in my next
projects? Those questions will help you decide on what to focus on.
I’ve seen so many people start with the most complex routines and ended up spending too
much time trying to solve a long process. It is better to focus on a small task and then move to
the next one. Creating and solving smaller routines are more useful and easy to manage.
Having a strong software knowledge and understanding of Dynamo and Civil 3D are important.
I’ve also seen most automation routines leverage the List, Range, Import / Export to excel and
use packages like Civil 3D Toolkit to supercharge their graphs. It is recommended to try and use
those as well.
Dynamo Primer
In searching for a better way of learning Dynamo for Civil 3D, it is highly recommended for first
time users to start reading the Dynamo primer https://primer.Dynamobim.org/. Then once you
learn the basics, try and test it yourself by doing small routines like changing layers, adding
property sets, adding object data, creating labels, and creating civil objects to changing
parameters. Once you’ve successfully completed all the smaller tasks, it will be heaps easier to
start combining those routines to do more useful automation with lesser effort.
Automation Routine
You might find something useful from previously created routines that you can recycle. Try to
learn simple to complex routines and from your learnings, create your own automation routine.
Every automation you make is intended to help you save time and make your work more
efficient.
Page 36
Reference
Page 37
Appendix 1 – Dynamo Shortcut Key
Shortcut Key Description Image
Ctrl+B Swap background code blocks
and 3d drawings (vice versa)
Page 38
Appendix 2 – Bonus Content > LandDevelopment
Civil 3D Toolkit > LandDevelopment > CogoPointExtensions
Cogo Points in Civil 3D stand for Coordinate Geometry points. Cogo points can be stored in a
project outside a drawing and reference by multiple users.
Page 39
Figure 5.1.C CogoPointExtensions.User Defined Properties
Page 40
Figure 5.1.E CogoPointExtensions.Set Continued
Page 41
Civil 3D Toolkit > LandDevelopment > FeatureLine
Page 42
Figure 5.2.C FeatureLine Get Data
Page 43
Civil 3D Toolkit > LandDevelopment > Parcel
Figure 5.3.A Parcel.Get User Defined Properties and Set User Defined Properties
Page 44
Civil 3D Toolkit > LandDevelopment > Site
Page 45
Acknowledgement
Learning Civil 3D Toolkit and Dynamo for Civil 3D requires a lot of research, reading and
testing. I would like to say thank you to Paolo Serra & Safi Hage for developing the Civil 3D
Toolkit package and for providing their full support, technical advice and sharing some sample
Dynamo files. I would also like to say thank you to Adam Walmsley, Ben Wardell and David
Licona for their assistance and technical advice.
Page 46