Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00.05 --> 00:00:01.04
- [Instructor] Let's start
2
00:00:01.04 --> 00:00:03.05
the typical generative design workflow
3
00:00:03.05 --> 00:00:05.00
with the input section.
4
00:00:05.00 --> 00:00:08.01
This is where we collect all of the inputs from the user
5
00:00:08.01 --> 00:00:10.02
and data from Revit, which is required
6
00:00:10.02 --> 00:00:11.08
to execute the graph.
7
00:00:11.08 --> 00:00:13.08
The inputs are also variables
8
00:00:13.08 --> 00:00:16.00
that allow the generative design algorithm
9
00:00:16.00 --> 00:00:17.04
to generate new results
10
00:00:17.04 --> 00:00:19.08
by adjusting the input sliders.
11
00:00:19.08 --> 00:00:22.09
I currently have the Revit and Dynamo exercise files open
12
00:00:22.09 --> 00:00:23.08
for this lesson.
13
00:00:23.08 --> 00:00:26.06
In the Revit file, I've created two walls.
14
00:00:26.06 --> 00:00:30.00
One wall with windows and one without.
15
00:00:30.00 --> 00:00:31.05
We'll use the blank wall
16
00:00:31.05 --> 00:00:34.01
to optimize the placement of windows
17
00:00:34.01 --> 00:00:37.00
and we'll use these windows placed in the other wall
18
00:00:37.00 --> 00:00:40.02
as the selection windows that can be placed.
19
00:00:40.02 --> 00:00:42.00
So they're currently placed here in the view
20
00:00:42.00 --> 00:00:44.09
so that we can easily collect them in Dynamo.
21
00:00:44.09 --> 00:00:47.04
Each window has several types.
22
00:00:47.04 --> 00:00:50.02
So while we're only using three different window types,
23
00:00:50.02 --> 00:00:53.00
each one has several widths that can be placed,
24
00:00:53.00 --> 00:00:54.08
which means there'll be many options
25
00:00:54.08 --> 00:00:56.08
for the generative design algorithm
26
00:00:56.08 --> 00:00:58.00
to select from.
27
00:00:58.00 --> 00:01:00.03
So we'll use Dynamo to select the wall we want
28
00:01:00.03 --> 00:01:03.02
to use and also collect these windows.
29
00:01:03.02 --> 00:01:04.05
In the Dynamo exercise file,
30
00:01:04.05 --> 00:01:09.02
we'll start with the input section over here to the left,
31
00:01:09.02 --> 00:01:12.08
which is indicated with this input title.
32
00:01:12.08 --> 00:01:14.09
Currently, I've already collected the windows
33
00:01:14.09 --> 00:01:16.04
in the project.
34
00:01:16.04 --> 00:01:17.07
I've done this by retrieving all
35
00:01:17.07 --> 00:01:20.05
of the family types in the window category
36
00:01:20.05 --> 00:01:22.09
and if we run the script,
37
00:01:22.09 --> 00:01:26.02
we can see in this List.Flatten node
38
00:01:26.02 --> 00:01:28.05
that there're actually 17 different types
39
00:01:28.05 --> 00:01:30.06
of windows we can select from.
40
00:01:30.06 --> 00:01:32.01
From each of these types,
41
00:01:32.01 --> 00:01:34.05
I've then retrieved the width parameter
42
00:01:34.05 --> 00:01:36.02
and the height parameter,
43
00:01:36.02 --> 00:01:41.02
which we can see in this Parameter.Value node.
44
00:01:41.02 --> 00:01:43.06
So let's start by remembering this data,
45
00:01:43.06 --> 00:01:46.01
using the Data.Remember node.
46
00:01:46.01 --> 00:01:47.04
As we learnt previously,
47
00:01:47.04 --> 00:01:49.08
we can use this node to optimize the graph
48
00:01:49.08 --> 00:01:52.00
so that it does not need to retrieve
49
00:01:52.00 --> 00:01:54.09
this window-type parameter information each time
50
00:01:54.09 --> 00:01:56.02
that it runs.
51
00:01:56.02 --> 00:01:57.06
Let's add two of these nodes,
52
00:01:57.06 --> 00:01:59.08
which are found in the GenerativeDesign section
53
00:01:59.08 --> 00:02:04.01
of the node library and then Data and Remember.
54
00:02:04.01 --> 00:02:05.02
Once we've placed these,
55
00:02:05.02 --> 00:02:09.02
let's plug those parameter values into each one.
56
00:02:09.02 --> 00:02:11.06
And then run the graph again.
57
00:02:11.06 --> 00:02:16.06
Perfect, so we now have that data stored in these nodes.
58
00:02:16.06 --> 00:02:19.06
Next, let's retrieve the wall data.
59
00:02:19.06 --> 00:02:22.04
To do that, we can use the selection nodes found
60
00:02:22.04 --> 00:02:24.01
in the generative design section
61
00:02:24.01 --> 00:02:27.00
of the node library.
62
00:02:27.00 --> 00:02:28.09
These nodes allow us to prompt the user
63
00:02:28.09 --> 00:02:30.09
to select elements in the model.
64
00:02:30.09 --> 00:02:36.08
So let's use the Select Wall Element node.
65
00:02:36.08 --> 00:02:40.00
And to make that an input that will show up on our dialog,
66
00:02:40.00 --> 00:02:44.04
we need to right click it and select Is Input.
67
00:02:44.04 --> 00:02:46.00
Great, so now that we have the wall,
68
00:02:46.00 --> 00:02:48.03
we'll need two bits of information.
69
00:02:48.03 --> 00:02:50.06
The location line of the wall to divide
70
00:02:50.06 --> 00:02:52.04
and the wall geometry.
71
00:02:52.04 --> 00:02:54.00
To get the location line,
72
00:02:54.00 --> 00:02:55.08
let's right click the canvas
73
00:02:55.08 --> 00:03:00.05
and search GetLocation.
74
00:03:00.05 --> 00:03:03.02
This retrieves the location line of an element.
75
00:03:03.02 --> 00:03:05.01
So we can plug the element into there
76
00:03:05.01 --> 00:03:07.07
and next, we want the element geometry.
77
00:03:07.07 --> 00:03:13.08
To do this we can use the Element.Geometry node.
78
00:03:13.08 --> 00:03:15.07
And plug that in.
79
00:03:15.07 --> 00:03:17.00
Just like the window data,
80
00:03:17.00 --> 00:03:19.02
we also need to store this data
81
00:03:19.02 --> 00:03:22.04
so that Dynamo does not need to retrieve it over and over.
82
00:03:22.04 --> 00:03:25.08
So let's add in two more remember nodes
83
00:03:25.08 --> 00:03:28.04
and we'll plug the location line into one
84
00:03:28.04 --> 00:03:31.05
and the geometry into the other.
85
00:03:31.05 --> 00:03:34.03
If we go ahead and run the script,
86
00:03:34.03 --> 00:03:36.00
we can see we're getting an error
87
00:03:36.00 --> 00:03:38.09
because we haven't selected a wall element yet.
88
00:03:38.09 --> 00:03:41.00
These nodes will work once the user
89
00:03:41.00 --> 00:03:43.00
has selected a wall.
90
00:03:43.00 --> 00:03:44.07
Great, so we have the Revit data.
91
00:03:44.07 --> 00:03:46.08
We will need to run our graph.
92
00:03:46.08 --> 00:03:49.03
Next, we need the variables that can change
93
00:03:49.03 --> 00:03:50.09
for different design options.
94
00:03:50.09 --> 00:03:53.09
For that, let's add in two integer sliders.
95
00:03:53.09 --> 00:03:56.00
We can find these sliders
96
00:03:56.00 --> 00:03:58.00
by right clicking the canvas
97
00:03:58.00 --> 00:04:01.09
and searching Integer and Integer Slider should show up.
98
00:04:01.09 --> 00:04:03.03
Once you've placed one,
99
00:04:03.03 --> 00:04:06.01
let's copy and paste it using Control + C
100
00:04:06.01 --> 00:04:07.08
and Control + V.
101
00:04:07.08 --> 00:04:10.01
We want both of these sliders to be inputs.
102
00:04:10.01 --> 00:04:12.00
So let's right click both of them
103
00:04:12.00 --> 00:04:15.09
and select Is Input.
104
00:04:15.09 --> 00:04:17.02
The first slider we'll use
105
00:04:17.02 --> 00:04:19.08
to specify the number of segments
106
00:04:19.08 --> 00:04:22.03
to create in the wall location line.
107
00:04:22.03 --> 00:04:25.03
So let's rename it by right clicking it
108
00:04:25.03 --> 00:04:27.04
and selecting Rename Wall
109
00:04:27.04 --> 00:04:33.05
and we'll rename it to Number of Wall Segments.
110
00:04:33.05 --> 00:04:35.02
And hit Accept.
111
00:04:35.02 --> 00:04:39.04
This name will now show up in the Generative Design dialog.
112
00:04:39.04 --> 00:04:42.06
Next, let's adjust the max and min of the slider
113
00:04:42.06 --> 00:04:45.03
and we can do that by selecting this button here
114
00:04:45.03 --> 00:04:48.00
to the left.
115
00:04:48.00 --> 00:04:52.06
For the min, let's change it to two and the max, 40.
116
00:04:52.06 --> 00:04:54.03
By having the min as two,
117
00:04:54.03 --> 00:04:56.08
it means that we'll always have a minimum
118
00:04:56.08 --> 00:04:58.08
of two segments of wall,
119
00:04:58.08 --> 00:05:05.08
which means we'll place at least one window in the middle.
120
00:05:05.08 --> 00:05:07.06
The second slider will be used
121
00:05:07.06 --> 00:05:09.02
to select the window type.
122
00:05:09.02 --> 00:05:16.06
So let's rename it Window Selection.
123
00:05:16.06 --> 00:05:18.00
For the range of this one,
124
00:05:18.00 --> 00:05:20.08
we want to limit it to the amount of windows
125
00:05:20.08 --> 00:05:24.03
that are available, which we know is 17.
126
00:05:24.03 --> 00:05:27.06
So the max will be 16 and the min zero.
127
00:05:27.06 --> 00:05:32.04
This is because lists always start at index zero.
128
00:05:32.04 --> 00:05:33.06
Perfect.
129
00:05:33.06 --> 00:05:34.04
The last thing we need to do
130
00:05:34.04 --> 00:05:36.00
is retrieve the width and height
131
00:05:36.00 --> 00:05:39.09
of the window type that this slider is set to.
132
00:05:39.09 --> 00:05:44.06
To do that, let's add in two GetItemAtIndex nodes
133
00:05:44.06 --> 00:05:48.08
by right clicking and searching GetItemAtIndex.
134
00:05:48.08 --> 00:05:54.08
And then copy and pasting that node.
135
00:05:54.08 --> 00:05:57.04
And we'll move them over to the remember nodes
136
00:05:57.04 --> 00:05:59.03
of the wall data.
137
00:05:59.03 --> 00:06:01.01
For the index inputs,
138
00:06:01.01 --> 00:06:04.06
we want to use the slider that we just created.
139
00:06:04.06 --> 00:06:14.09
So we'll plug that into both of these indexes.
140
00:06:14.09 --> 00:06:16.03
And for the list inputs,
141
00:06:16.03 --> 00:06:25.01
we want the width information and the height information.
142
00:06:25.01 --> 00:06:27.09
Great, so now based on the window selection,
143
00:06:27.09 --> 00:06:32.03
we'll have the relevant width and height.
144
00:06:32.03 --> 00:06:34.04
The last thing we need to do is group all
145
00:06:34.04 --> 00:06:39.03
of our nodes and color it pink.
146
00:06:39.03 --> 00:06:42.01
This indicates the sections as inputs
147
00:06:42.01 --> 00:06:44.04
and also makes our graph a little bit tidier.
11360
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.