# Rotate family along a path

**URL:** <https://forum.dynamobim.com/t/rotate-family-along-a-path/28635>\
**Category:** Packages\
**Tags:** revit, dynamo\
**Created:** [November 19, 2018, 2:57pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635 "2018-11-19T14:57:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 19, 2018, 2:57pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/1 "2018-11-19T14:57:00Z")

</div>

Hello!  
Im having a problem with the rotation of my family along a path. It shouldnt be a huge problem but Dynamo only rotates the first family and the others not. (see screenshot).  
Could anyone assist in this?  
Thank you in advance!

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/6/16bfdcfcaeadf7721f46d257a623cb71d5f135d2.jpeg)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 19, 2018, 2:59pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/2 "2018-11-19T14:59:51Z")

</div>

Hi 🙂

Have you tried using the list levels ? Try setting FamilyInstance.SetRotation inputs level to @L2 and @L1.

[http://primer.dynamobim.org/en/06\_Designing-with-Lists/6-3\_lists-of-lists.html#](http://primer.dynamobim.org/en/06_Designing-with-Lists/6-3_lists-of-lists.html#)

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 19, 2018, 3:24pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/3 "2018-11-19T15:24:04Z")

</div>

But the input level for "SetRotation is already set to @L2 and @L1 or not?  
And from the list it seems like only the first point is coming through and the others not.

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 19, 2018, 3:27pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/4 "2018-11-19T15:27:58Z")

</div>

Could you show what you tried ? 🙂

Here is what i thought of :

![16bfdcfcaeadf7721f46d257a623cb71d5f135d2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/4/1477b6ef44d2be4c52202f8e8a62b538c7c7ed41.jpeg)

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 19, 2018, 3:37pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/5 "2018-11-19T15:37:15Z")

</div>

yeahh it worked like that. Im pretty new to Dynamo so I didnt know how to do that 😃  
Thank you! 🙂  
May I have another question?  
When I got a family with a profile which is extruded for example about a meter, it needs to have two points.  
So I want to place this family along a path. How do I do that?

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 19, 2018, 3:41pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/6 "2018-11-19T15:41:14Z")

</div>

Glad i helped 🙂

I’m no expert, but if your family is an adaptive component family, you can use the AdaptiveComponent.ByPoints node.

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 20, 2018, 9:37am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/7 "2018-11-20T09:37:31Z")

</div>

Im not sure how to place both points of my adaptive family on the path. Have you got a solution for that? 🙂

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aaf52c8a2266dd47ed4c8a94315bd300b34e6367.jpeg)

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [November 20, 2018, 9:41am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/8 "2018-11-20T09:41:30Z")

</div>

You should use [`AdaptiveComponent.ByPoints`](http://dictionary.dynamobim.com/#/Revit/Elements/AdaptiveComponent/Action/ByPoints) to make adaptive components. To use it, you need to feed a list of sublists, where the sublist has the points to make the component by. The list structure should be like this:

```
[0] List - for adaptive component 1
    [0] Point1
    [1] Point2
[1] List - for adaptive component 2
    [0] Point1
    [1] Point2
etc...
```

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 20, 2018, 9:42am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/9 "2018-11-20T09:42:46Z")

</div>

Well, clearly it depends on your whole your graph but the idea is to generate couples of points that describe the placement of the instances of your families. The AdaptativeComponent.ByPoints node should help you do that.

Refer to @kennyb6 post, he said it all 🙂

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 20, 2018, 9:57am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/10 "2018-11-20T09:57:36Z")

</div>

That wont be an easy challenge. Because Im getting an Excel File from Civil 3D. From this points Im creating my curve. And the easiest way for me now would be to tell the family it needs to pick its Z Values from the created curve.  
Because I want to place this family not only once, just behind one another.  
Im happy that you are trying to help me. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 20, 2018, 10:01am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/11 "2018-11-20T10:01:13Z")

</div>

How about dividing your curve directly on Dynamo ? You have several nodes that might help you do that. From the division you’ll get, you could simply compute the corresponding points.

If you just want to place one instance of your family (i.e. if it is only a cross section that you want to extrude over a curve, you might simply only give the strat and the point of that long curve, it should do the trick.

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 20, 2018, 10:12am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/12 "2018-11-20T10:12:11Z")

</div>

In this project an extrusion is not enough unfortunately.  
I need to have many tunnel blocks with not always the same length.  
The length should be taken from an Excel file. But its hard to tell Dynamo to divide my path into not equal Chord lengths right?

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 20, 2018, 10:15am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/13 "2018-11-20T10:15:19Z")

</div>

> [@RedRai](#):
>
> But its hard to tell Dynamo to divide my path into not equal Chord lengths right?

In my experience, this is quite doable. You should use something like the Curve.PointAtSegmentLength node, and feed in the list of lengths (tweaked a little bit) to generate your points.

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 20, 2018, 10:33am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/14 "2018-11-20T10:33:20Z")

</div>

I tried it the way you said it and got now for example 2 points.  
Now I need to say the AdaptiveComponent.ByPoints node to pick these 2 points the way kennyb6 wrote right?  
But how exactly do i do that?

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/3/13076eed82a49ad989228d569d96e3ffd5cabd40.jpeg)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 20, 2018, 10:41am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/15 "2018-11-20T10:41:18Z")

</div>

I do not have access to all of your inputs, so hard to tell. Try to do the exercises of this link (and the ones that follow), it might help you create all the inputsyou need for your problem : [http://primer.dynamobim.org/en/06\_Designing-with-Lists/6-2\_working-with-lists.html](http://primer.dynamobim.org/en/06_Designing-with-Lists/6-2_working-with-lists.html)

I’ll make a quick example by myself if I can.

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 20, 2018, 1:20pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/16 "2018-11-20T13:20:53Z")

</div>

Tried it this way. But it doesnt work. Any idea?

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/83b8324096d0e2c8fa6f7cb8b70f81cdb3ba44f7.jpeg)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 20, 2018, 1:37pm UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/17 "2018-11-20T13:37:24Z")

</div>

You can try something like this : (sorry the names got cut down, but the names of the variables are : total\_len, lens, params, params\_final)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/9/297fec9f2bbfd1d298cc29e3ed4b0d88dcc81b17.png)

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 21, 2018, 8:04am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/18 "2018-11-21T08:04:33Z")

</div>

thank you mellouze. Got it work 🙂  
Another question (Can i always post it here or do i need to make a new topic for that?)  
I need to substract two lists to get the length of every tunnel block. I tried a few things but it didnt work. (See

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/9/b99e27e42b083b5bf5aded2141c1e636dec8175d.jpeg) ![2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/3/c39f24b160901f99499c88032c14c9c724d78652.jpeg) screenshot). Any idea?

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 21, 2018, 8:19am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/19 "2018-11-21T08:19:47Z")

</div>

ok already found the problem 🙂  
I needed to make String.ToNumber and then subtract the lists

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 21, 2018, 8:38am UTC](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635/20 "2018-11-21T08:38:18Z")

</div>

Glad you figured it out 🙂

Always try to make distinct topics for really distinct problems as it is more convinient for people looking for the answer to a specific problem !

[Next page](https://forum.dynamobim.com/t/rotate-family-along-a-path/28635.md?page=2)
