& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Transcript
00:00
INSTRUCTOR: In this session, we will
00:02
discuss how to organize your graph using the Dynamo grouping
00:05
and aligning tools.
00:06
Organizing your graph is an important step
00:08
for ensuring readability to the next viewer of your script.
00:12
We will also review how to set nodes
00:14
as inputs so they appear as available entries
00:16
within the Dynamo player.
00:18
This is also an important step for anyone
00:20
that wants to use your script in their workflow,
00:22
but is not familiar with the Dynamo interface.
00:25
The individual workflows covered in this lesson
00:27
are aligning nodes using the Dynamo tools,
00:31
grouping nodes, renaming those groups and individual nodes,
00:37
and setting the nodes as inputs or outputs.
00:40
Let's switch over to the Dynamo interface
00:42
with our finished graph and get started.
00:45
This is the completed graph from the previous session.
00:48
It looks a bit messy and difficult to understand,
00:51
so we will be aligning the nodes to make
00:53
the graph visually appealing.
00:55
There are several Dynamo tools I can
00:57
use to help organize the graph.
00:59
Underneath the Edit menu, at the top,
01:02
I can choose Clean Up Node Layout.
01:05
Dynamo will automatically organize your graph
01:07
by aligning nodes in the left justification.
01:11
If you prefer to organize the graph further,
01:13
you can select individual nodes and align them
01:16
with different justifications.
01:18
Selecting multiple nodes in Dynamo
01:20
works the same as an AutoCAD in Civil 3D.
01:24
By left mouse-picking and holding
01:26
the Shift key down at the same time,
01:28
I can individually select nodes and add them
01:32
to my selection set.
01:35
I can also do a window to select multiple nodes
01:37
at the same time, or use the crossing window.
01:45
Once I have the nodes selected that I want to align,
01:53
I'm going to right-mouse click and choose
01:56
Align Selection, Top.
01:60
You'll notice that all the nodes that I had selected
02:02
are now aligned along the top edge.
02:06
Once I have my graph organized, I want to group
02:08
the nodes to draw attention to their individual functions.
02:13
I'm going to gather all of the calls
02:14
given with the alignment, the name and station and list
02:18
creation, into one group.
02:20
I'll do this by selecting all of the nodes,
02:24
right-clicking, and choosing Create Group.
02:29
You'll notice that a color is placed on the back of all
02:33
of these nodes.
02:34
By left-clicking on the group, it
02:37
will highlight all of the nodes that are part of that group.
02:41
By holding down my left mouse button,
02:44
I can easily move and organize all
02:46
of these nodes that are in that group at the same time.
02:49
To rename the group, I'm going to double-click on the group
02:53
title and give it a new name.
02:56
I can also change the background color of the group
02:59
by right-clicking inside of the group color
03:01
and giving it a specific color.
03:05
I'll continue by grouping the nodes that
03:07
are converting the stations to coordinate system,
03:09
and then deploy.
03:17
Lastly, we'll gather all the nodes
03:19
used to create the block and the drawing into our final group.
03:32
Now that our graph is organized, we
03:34
need to establish which nodes will need a specific entry
03:37
through the Dynamo player.
03:39
I'm going to start at the far-left of the graph.
03:42
At our very first node, Selecting Alignment
03:44
By Name, we need the user of this script
03:47
to enter in the specific name of the alignment.
03:49
So we need to set this String node as an input file.
03:53
To do this, we will left-pick to highlight the String node,
03:57
right-click, and choose Is Input.
04:02
If you right-click again, you'll see that the checkmark
04:05
is next to Is Input.
04:07
In the Dynamo player, the user will
04:09
see String with a location for them to input a value.
04:12
We want to call their attention that they
04:14
need to enter a value to select the specific alignment by name.
04:18
So we need to change the name of this node
04:20
to give them an indication of which
04:22
values they need to enter.
04:23
To bring in a node, you're going to double-click on the node.
04:28
And when the Edit Node Name dialog box appears,
04:31
you're going to enter in the value that would
04:33
appear in the Dynamo player.
04:34
For this specific input value, I'm
04:36
going to ask the user to name the alignment.
04:42
Once I click Accept, you'll notice
04:44
that the name of the node has changed to Name of Alignment.
04:47
This is what will appear in the Dynamo player.
04:51
I'm going to keep moving through the graph
04:52
and setting the input values for each individual entry
04:55
that I need the user to make.
04:57
The next input value we need to set, the interval value.
05:01
Again, I'm going to right-click on the Number node
05:04
and establish this as an Is Input.
05:07
By double-clicking on the Number node,
05:11
I'm going to rename this node to Interval Between Blocks.
05:20
Again, this is the entry that will
05:22
appear on the Dynamo player.
05:24
I may want to give an option to the users
05:26
to allow them to include geometry stations of the block.
05:30
To do this, I'm going to also need
05:32
to set this Boolean value as an Is Input.
05:37
I'm going to rename this Boolean node to Include Geometry
05:41
Stations.
05:46
The next input value that I want to set
05:49
is going to be the Alignment Offset Coordinates.
05:53
For my specific purposes, we were doing it
05:55
along the center line of the alignment.
05:57
But that doesn't mean that the next person that's
05:59
going to use the script may not want to establish an offset.
06:03
So I'm going to change this Number node to Is Input
06:06
and rename the node to Offset Value.
06:15
In the Create Block group, I need
06:18
to enter the name of the block that's in my current drawing.
06:22
So the String node that is applied
06:24
to the Name value of the block name,
06:26
I need to also set that as Is Input
06:29
and rename this node to Block Name.
06:35
I'm also asking to set this specific block
06:38
on a specific layer.
06:40
So I need to change this last String node to an Is Input
06:46
and change the name of that node to Block Layer.
06:51
Once I have saved my Dynamo script,
06:53
I can close out of the Dynamo interface.
06:57
When I'm back into Civil 3D and I go to the Manage tab,
07:00
Visual Programming panel, go to the Dynamo player,
07:05
you'll notice that I now have the CreateTreeAlongAlignment2
07:09
Dynamo script that I just created.
07:11
By clicking on the Edit Input Values,
07:14
you'll notice that here are all the entries that I just
07:16
established as inputs in my Dynamo interface.
07:20
This concludes the session on organizing the Dynamo graph
07:23
and setting inputs.
00:00
INSTRUCTOR: In this session, we will
00:02
discuss how to organize your graph using the Dynamo grouping
00:05
and aligning tools.
00:06
Organizing your graph is an important step
00:08
for ensuring readability to the next viewer of your script.
00:12
We will also review how to set nodes
00:14
as inputs so they appear as available entries
00:16
within the Dynamo player.
00:18
This is also an important step for anyone
00:20
that wants to use your script in their workflow,
00:22
but is not familiar with the Dynamo interface.
00:25
The individual workflows covered in this lesson
00:27
are aligning nodes using the Dynamo tools,
00:31
grouping nodes, renaming those groups and individual nodes,
00:37
and setting the nodes as inputs or outputs.
00:40
Let's switch over to the Dynamo interface
00:42
with our finished graph and get started.
00:45
This is the completed graph from the previous session.
00:48
It looks a bit messy and difficult to understand,
00:51
so we will be aligning the nodes to make
00:53
the graph visually appealing.
00:55
There are several Dynamo tools I can
00:57
use to help organize the graph.
00:59
Underneath the Edit menu, at the top,
01:02
I can choose Clean Up Node Layout.
01:05
Dynamo will automatically organize your graph
01:07
by aligning nodes in the left justification.
01:11
If you prefer to organize the graph further,
01:13
you can select individual nodes and align them
01:16
with different justifications.
01:18
Selecting multiple nodes in Dynamo
01:20
works the same as an AutoCAD in Civil 3D.
01:24
By left mouse-picking and holding
01:26
the Shift key down at the same time,
01:28
I can individually select nodes and add them
01:32
to my selection set.
01:35
I can also do a window to select multiple nodes
01:37
at the same time, or use the crossing window.
01:45
Once I have the nodes selected that I want to align,
01:53
I'm going to right-mouse click and choose
01:56
Align Selection, Top.
01:60
You'll notice that all the nodes that I had selected
02:02
are now aligned along the top edge.
02:06
Once I have my graph organized, I want to group
02:08
the nodes to draw attention to their individual functions.
02:13
I'm going to gather all of the calls
02:14
given with the alignment, the name and station and list
02:18
creation, into one group.
02:20
I'll do this by selecting all of the nodes,
02:24
right-clicking, and choosing Create Group.
02:29
You'll notice that a color is placed on the back of all
02:33
of these nodes.
02:34
By left-clicking on the group, it
02:37
will highlight all of the nodes that are part of that group.
02:41
By holding down my left mouse button,
02:44
I can easily move and organize all
02:46
of these nodes that are in that group at the same time.
02:49
To rename the group, I'm going to double-click on the group
02:53
title and give it a new name.
02:56
I can also change the background color of the group
02:59
by right-clicking inside of the group color
03:01
and giving it a specific color.
03:05
I'll continue by grouping the nodes that
03:07
are converting the stations to coordinate system,
03:09
and then deploy.
03:17
Lastly, we'll gather all the nodes
03:19
used to create the block and the drawing into our final group.
03:32
Now that our graph is organized, we
03:34
need to establish which nodes will need a specific entry
03:37
through the Dynamo player.
03:39
I'm going to start at the far-left of the graph.
03:42
At our very first node, Selecting Alignment
03:44
By Name, we need the user of this script
03:47
to enter in the specific name of the alignment.
03:49
So we need to set this String node as an input file.
03:53
To do this, we will left-pick to highlight the String node,
03:57
right-click, and choose Is Input.
04:02
If you right-click again, you'll see that the checkmark
04:05
is next to Is Input.
04:07
In the Dynamo player, the user will
04:09
see String with a location for them to input a value.
04:12
We want to call their attention that they
04:14
need to enter a value to select the specific alignment by name.
04:18
So we need to change the name of this node
04:20
to give them an indication of which
04:22
values they need to enter.
04:23
To bring in a node, you're going to double-click on the node.
04:28
And when the Edit Node Name dialog box appears,
04:31
you're going to enter in the value that would
04:33
appear in the Dynamo player.
04:34
For this specific input value, I'm
04:36
going to ask the user to name the alignment.
04:42
Once I click Accept, you'll notice
04:44
that the name of the node has changed to Name of Alignment.
04:47
This is what will appear in the Dynamo player.
04:51
I'm going to keep moving through the graph
04:52
and setting the input values for each individual entry
04:55
that I need the user to make.
04:57
The next input value we need to set, the interval value.
05:01
Again, I'm going to right-click on the Number node
05:04
and establish this as an Is Input.
05:07
By double-clicking on the Number node,
05:11
I'm going to rename this node to Interval Between Blocks.
05:20
Again, this is the entry that will
05:22
appear on the Dynamo player.
05:24
I may want to give an option to the users
05:26
to allow them to include geometry stations of the block.
05:30
To do this, I'm going to also need
05:32
to set this Boolean value as an Is Input.
05:37
I'm going to rename this Boolean node to Include Geometry
05:41
Stations.
05:46
The next input value that I want to set
05:49
is going to be the Alignment Offset Coordinates.
05:53
For my specific purposes, we were doing it
05:55
along the center line of the alignment.
05:57
But that doesn't mean that the next person that's
05:59
going to use the script may not want to establish an offset.
06:03
So I'm going to change this Number node to Is Input
06:06
and rename the node to Offset Value.
06:15
In the Create Block group, I need
06:18
to enter the name of the block that's in my current drawing.
06:22
So the String node that is applied
06:24
to the Name value of the block name,
06:26
I need to also set that as Is Input
06:29
and rename this node to Block Name.
06:35
I'm also asking to set this specific block
06:38
on a specific layer.
06:40
So I need to change this last String node to an Is Input
06:46
and change the name of that node to Block Layer.
06:51
Once I have saved my Dynamo script,
06:53
I can close out of the Dynamo interface.
06:57
When I'm back into Civil 3D and I go to the Manage tab,
07:00
Visual Programming panel, go to the Dynamo player,
07:05
you'll notice that I now have the CreateTreeAlongAlignment2
07:09
Dynamo script that I just created.
07:11
By clicking on the Edit Input Values,
07:14
you'll notice that here are all the entries that I just
07:16
established as inputs in my Dynamo interface.
07:20
This concludes the session on organizing the Dynamo graph
07:23
and setting inputs.
Try it: Organizing the graph and setting inputs