Because Adaptive Components have multiple placement points, the process to place these family instances in Revit requires data to be structured in a specific way. In this video, we will place a series of two-point Adaptive Components by first gathering lists of each component's first and second placement points, then construct a nested list of points that is structured correctly to place the families.
- [Voiceover] This is one case when we're required to construct a nested list of points. So I recommend watching the video about working with nested lists before tackling adaptive component placement. Let's begin by planning where these cables will go. In a previous video, I placed a single point on the exterior wall of the building, and I'd like all the cables to originate from that point and connect to the canopy's structural framing. The structural framing was also generated by Dynamo using these input curves. I've also used the curved, pointed parameter node to extract a point on each curve set back a little bit from the front edge of the canopy.
Each of the four adaptive components that Dynamo places should connect this point and the point placed on the exterior of the building. Let's strap in the node that we'll need to place our adaptive components. We can find the node that we need to place adaptive components under the Revit elements adaptive component section of the node library. We can see that it takes two inputs. One of them is our list of points, and the other one is the family type. Since we've already worked with the family types node in another video, let's go ahead and place that one since we already know how it works. We could find the family types node under Revit selection. Now let's talk about our points input.
In order for this node to run properly, we need to structure our point data in a very specific way. In this case, we're about to place a series of two-point adaptive components. So when we provide the point data to the node, it needs to be grouped so that each adaptive component we'd like Dynamo to place is grouped as a list of two points. To reiterate, we're about to place four adaptive components, each having two points. The data we provide to Dynamo needs to be structured as four lists, each list having two points. So now that we know how the data needs to be structured, let's go about constructing our point lists.
We already have all of the points in the canopy structure, organized as a single list of four points. That's a good start. We need to be able to pair each of these points with the single point on the building exterior coming out of our select point on face node. I'm going to introduce you now to a node that can create four copies of the same data called list cycle. We can find it under the the core list section of the node library. This node takes an item as an input and repeats it as many times as you specify in the amount input.
Let's copy this point item four times. I'll go ahead and plug the point into our list input. For the amount, we're going to need to plug in the number four, so I'll drop in a number input. When I hit run, you can see that the list cycle node has made four copies of the same point data that we gave it. Now we have all the data we need: four points in one list and four points in the other. I'm gonna drop in a list create node so that we can have all of the points that we need organized as a nested list. Now we have all of our points, four in one list and four in another.
Remember how we need to structure the data, though, not in two lists of four points, but in four lists of two points. This is another perfect time to use our list transpose node, which will take both of the index zero items of both lists, and put them into their own sublist As well as the index ones, index twos, and index threes. After I hit run and look at the data coming out of the list transpose node, it looks like we have all of our data structured the way it needs to be: four lists, each containing two points. Let's go ahead and plug our point data into the points input of our adaptive component node.
I'm going to put Dynamo side-by-side with our Revit window to see if it works when we hit run. Excellent! We can see four adaptive components were placed in the Revit environment. So despite the very specific data structure that we need to follow to place adaptive components with Dynamo, it's nothing you can't handle with just a little bit of list management.
- Placing and connecting Dynamo nodes
- Understanding Dynamo's data types
- Performing math functions
- Creating number lists and text strings
- Writing data to an Excel spreadsheet
- Creating points, curves, surfaces, and solids
- Analyzing geometry
- Linking a Dynamo-driven SAT into Revit
- Placing Revit families with Dynamo
- Creating Revit views and sheets with Dynamo