Вы находитесь на странице: 1из 1

You can create a list with other lists. This is referred to as embedding lists or nesting lists.

You may
wish to do this yourself, but Dynamo does this during certain workflows with Revit. For that reason, it
is important to understand how to work with embedded lists and extract data from embedded
lists. For example, when selecting multiple elements in Revit and then performing a geometric
function on those elements, Dynamo creates embedded lists. You can create a list with other lists
using the List.Create node. The process is very similar to creating other lists. In this exercise, two
lists have been created each containing four points. In the node Library, expand Core > List. Click
List.Create to place the node in the workspace. Next, click the plus (+) button to add another item to
the node. Now to embed the two lists that are already created, connect the list outputs of the other
List.Create nodes to the item inputs on the List.Create node you just placed. Then hover the cursor
over the node to see the output. First of all, pay attention to the list at level notations at the bottom:
@L1, @L2, and @L3. These indicate the various levels in the list. @L1 is the first level. The first
level is all of the items in the list. In this example, the items are the points. The first level will always
be the items in the list.@L2 is the second level. In this example, the second level is the nested
lists. And lastly, the third level, @L3, is the main list in this example. When you look at the output of
the other List.Create nodes, you can see that there are only two levels. @L2 in those lists is the
main list. A single list will have two levels the items and then the list. In the case of nested lists,
there will be more levels. Back to the nested lists, you can see that each list is numbered based on
the index. You can also collapse and expand the nested lists, as needed. In summary, when working
with lists within lists, the level and index are important to understand.

Вам также может понравиться