& Construction

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

Professional CAD/CAM tools built on Inventor and AutoCAD
Transcript
00:00
In this session, we will discuss passing the information that
00:03
has been imported into Dynamo.
00:05
Once data is imported into Dynamo
00:07
we want to separate out that data.
00:09
So we can apply functions.
00:11
In this example, we have imported a CSV file
00:13
to represent points resulting in five separate lists of data
00:17
to work with.
00:19
We are now at the second step in this course.
00:21
So let's switch over to Dynamo and get started.
00:24
We've already imported our data from a CSV,
00:27
and have a total of five separate lists.
00:30
List 0 starts with point numbers,
00:33
then the northern is doing elevation and description.
00:40
We want to automate the creation of cogo points inside
00:42
of Seville 3D.
00:44
And in order to create the cargo points
00:45
we just need the northern eating an elevation list.
00:49
Understanding how to work with lists
00:50
is fundamental to learning Dynamo to pass the three
00:54
list of information we need.
00:55
There are two methods we can use the nodes in the list
00:58
category found in the Dynamo library
01:02
or we can use a code block.
01:04
Let's first discuss the nodes available in the list category.
01:07
And then we can take a look at code blocks under the list
01:10
category inspect subcategory.
01:14
We have the option to get item at index,
01:19
we can find this through the library
01:21
or by searching right clicking in the workspace
01:24
allows us quick access to the search when we
01:32
are getting an item at index.
01:33
We are asking dynamos to pool the information
01:35
at that specific list.
01:37
Index let's add this node to the end of our graph.
01:42
And connected to our list of imported data for the index
01:45
number.
01:45
We want to capture the northern eating and elevation.
01:49
So the first index that we will capture
01:50
is the northern which is list index 1 will enter in a number
01:55
node enter 1 for the number and connect it to the index input
02:04
port let's run the graph and see what the result is.
02:11
We now have one complete list of all of our North things
02:15
to get our e wings and our elevations
02:17
will need to copy the list item at index and the number
02:21
and paste it two more times into our graph
02:26
for the number nodes for these next two lists.
02:29
Index will enter in 2, and
02:35
You'll notice that we now have three separate lists.
02:38
The first one is going to be our northern then
02:42
our e gangs and our elevations if we wanted
02:49
to capture our point numbers and our descriptions
02:52
in separate lives, we can certainly
02:54
add more get item at index nodes and number
02:58
nodes resulting in 10 total nodes to pass the information.
03:02
While this method certainly works and gives you
03:04
the data needed in separate lists
03:06
there is a much easier way to create these lists
03:08
through a code block node using code blocks are much easier
03:12
to manage.
03:13
They save space and can speed the runtime of the graph.
03:16
This method will eliminate the need for the multiple nodes
03:19
and provide the same result to create a code block node.
03:23
We will double click inside the workspace.
03:26
Code blocks except all types of data.
03:28
And you can use design scripts syntax within them
03:31
to get a glimpse of what is behind the scenes for each
03:33
of these nodes and to aid in learning the syntax.
03:37
You can select any number of nodes
03:39
and use the node 2 code function by right clicking and selecting
03:44
node to code.
03:46
We will create a similar condensed syntax
03:49
in our code block.
03:53
Instead of our code block.
03:54
We'll double click and enter in number,
03:58
which is just a description for our number list.
04:01
We'll enter a variable.
04:03
Let's call it x open brackets zero close brackets semicolon.
04:11
We'll continue using the same syntax for the northern
04:15
only since our northern list is 1,
04:17
we will enter in one in the brackets
04:21
feasting will be to elevation B3 and description.
04:39
Well be for once we click it outside of this code block,
04:44
we will get an ax as an input value.
04:46
And then each one of these lines with a semicolon
04:49
will become an output.
04:51
Now we can connect our list to our x and run the graph.
05:00
By adding watch nodes and connecting each output
05:03
to the watch input and running our graph,
05:07
you'll see we get the same result at the get item at index
05:10
as we do with one simple code block,
05:13
we can now delete our nodes forget item at index.
05:17
Use our code block and continue applying functions
05:20
to any one of these outputs.
00:00
In this session, we will discuss passing the information that
00:03
has been imported into Dynamo.
00:05
Once data is imported into Dynamo
00:07
we want to separate out that data.
00:09
So we can apply functions.
00:11
In this example, we have imported a CSV file
00:13
to represent points resulting in five separate lists of data
00:17
to work with.
00:19
We are now at the second step in this course.
00:21
So let's switch over to Dynamo and get started.
00:24
We've already imported our data from a CSV,
00:27
and have a total of five separate lists.
00:30
List 0 starts with point numbers,
00:33
then the northern is doing elevation and description.
00:40
We want to automate the creation of cogo points inside
00:42
of Seville 3D.
00:44
And in order to create the cargo points
00:45
we just need the northern eating an elevation list.
00:49
Understanding how to work with lists
00:50
is fundamental to learning Dynamo to pass the three
00:54
list of information we need.
00:55
There are two methods we can use the nodes in the list
00:58
category found in the Dynamo library
01:02
or we can use a code block.
01:04
Let's first discuss the nodes available in the list category.
01:07
And then we can take a look at code blocks under the list
01:10
category inspect subcategory.
01:14
We have the option to get item at index,
01:19
we can find this through the library
01:21
or by searching right clicking in the workspace
01:24
allows us quick access to the search when we
01:32
are getting an item at index.
01:33
We are asking dynamos to pool the information
01:35
at that specific list.
01:37
Index let's add this node to the end of our graph.
01:42
And connected to our list of imported data for the index
01:45
number.
01:45
We want to capture the northern eating and elevation.
01:49
So the first index that we will capture
01:50
is the northern which is list index 1 will enter in a number
01:55
node enter 1 for the number and connect it to the index input
02:04
port let's run the graph and see what the result is.
02:11
We now have one complete list of all of our North things
02:15
to get our e wings and our elevations
02:17
will need to copy the list item at index and the number
02:21
and paste it two more times into our graph
02:26
for the number nodes for these next two lists.
02:29
Index will enter in 2, and
02:35
You'll notice that we now have three separate lists.
02:38
The first one is going to be our northern then
02:42
our e gangs and our elevations if we wanted
02:49
to capture our point numbers and our descriptions
02:52
in separate lives, we can certainly
02:54
add more get item at index nodes and number
02:58
nodes resulting in 10 total nodes to pass the information.
03:02
While this method certainly works and gives you
03:04
the data needed in separate lists
03:06
there is a much easier way to create these lists
03:08
through a code block node using code blocks are much easier
03:12
to manage.
03:13
They save space and can speed the runtime of the graph.
03:16
This method will eliminate the need for the multiple nodes
03:19
and provide the same result to create a code block node.
03:23
We will double click inside the workspace.
03:26
Code blocks except all types of data.
03:28
And you can use design scripts syntax within them
03:31
to get a glimpse of what is behind the scenes for each
03:33
of these nodes and to aid in learning the syntax.
03:37
You can select any number of nodes
03:39
and use the node 2 code function by right clicking and selecting
03:44
node to code.
03:46
We will create a similar condensed syntax
03:49
in our code block.
03:53
Instead of our code block.
03:54
We'll double click and enter in number,
03:58
which is just a description for our number list.
04:01
We'll enter a variable.
04:03
Let's call it x open brackets zero close brackets semicolon.
04:11
We'll continue using the same syntax for the northern
04:15
only since our northern list is 1,
04:17
we will enter in one in the brackets
04:21
feasting will be to elevation B3 and description.
04:39
Well be for once we click it outside of this code block,
04:44
we will get an ax as an input value.
04:46
And then each one of these lines with a semicolon
04:49
will become an output.
04:51
Now we can connect our list to our x and run the graph.
05:00
By adding watch nodes and connecting each output
05:03
to the watch input and running our graph,
05:07
you'll see we get the same result at the get item at index
05:10
as we do with one simple code block,
05:13
we can now delete our nodes forget item at index.
05:17
Use our code block and continue applying functions
05:20
to any one of these outputs.
Try it: Parsing Imported Data