# Rotating mutliple families

**URL:** <https://forum.dynamobim.com/t/rotating-mutliple-families/74012>\
**Category:** Revit\
**Tags:** revit, geometry, dynamo, familyinstance, family\
**Created:** [March 7, 2022, 7:43am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012 "2022-03-07T07:43:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmadkhalaf7892](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ahmadkhalaf7892/32/131910_2.png) [@ahmadkhalaf7892](https://forum.dynamobim.com/u/ahmadkhalaf7892)\
**Post date:** [March 7, 2022, 7:43am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/1 "2022-03-07T07:43:25Z")

</div>

![122](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/5/e55e6537aa7053bfdf1729b09d5cb912f7df5cd0.png)  
Hello Everyone , I wanted to ask how Can I rotate/aligin these families using dynamo , The picture on the left represents how the families are placed . the picture on the right represents how I want them to be placed.  
Note here each 4 circles are considered as one family . I want the concept or the idea of how I can achieve that only .  
thanks a lot

---

<div class="post-metadata">

**Author:** ![dylim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dylim/32/121211_2.png) [@dylim](https://forum.dynamobim.com/u/dylim)\
**Post date:** [March 7, 2022, 8:18am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/2 "2022-03-07T08:18:47Z")

</div>

Hi, @ahmadkhalaf7892.

My idea is calculate angle between the normal vectors of the line and true north, and set rotation.  
I tried it in my project but not tested with your family.  
Try it and give me a feedback.

Best regards  
DY

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0df300c4a5f3b61a7e70db93c2e2420243768885.png)

---

<div class="post-metadata">

**Author:** ![ahmadkhalaf7892](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ahmadkhalaf7892/32/131910_2.png) [@ahmadkhalaf7892](https://forum.dynamobim.com/u/ahmadkhalaf7892)\
**Post date:** [March 7, 2022, 8:22am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/3 "2022-03-07T08:22:01Z")

</div>

Thanks Dylim, I will try it now , But how will I select the family here that I want to rotate ?  
Thanks again

---

<div class="post-metadata">

**Author:** ![dylim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dylim/32/121211_2.png) [@dylim](https://forum.dynamobim.com/u/dylim)\
**Post date:** [March 7, 2022, 8:23am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/4 "2022-03-07T08:23:24Z")

</div>

Just simply use “Select Model Elements”.  
Here is the example.

By the way, the line must be 2D not 3D. if you want to use 3D line, you need to pull the line on the XY Plane first.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/892f4b58ac65570fa983295a817fc39a5923eb6a.png)

---

<div class="post-metadata">

**Author:** ![ahmadkhalaf7892](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ahmadkhalaf7892/32/131910_2.png) [@ahmadkhalaf7892](https://forum.dynamobim.com/u/ahmadkhalaf7892)\
**Post date:** [March 7, 2022, 8:24am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/5 "2022-03-07T08:24:55Z")

</div>

Sorry again I am a bit lost regarding where to place the nodes , can you provide with the script please

---

<div class="post-metadata">

**Author:** ![dylim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dylim/32/121211_2.png) [@dylim](https://forum.dynamobim.com/u/dylim)\
**Post date:** [March 7, 2022, 8:28am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/6 "2022-03-07T08:28:09Z")

</div>

Sorry, I didn’t save the script.  
However, I believe the images are well explained.

DY

---

<div class="post-metadata">

**Author:** ![ahmadkhalaf7892](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ahmadkhalaf7892/32/131910_2.png) [@ahmadkhalaf7892](https://forum.dynamobim.com/u/ahmadkhalaf7892)\
**Post date:** [March 7, 2022, 8:36am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/7 "2022-03-07T08:36:16Z")

</div>

[Dylim.dyn](https://forum.dynamobim.com/uploads/short-url/krmZSVhwyDYvbeWE6sOEHwEltP8.dyn) (26.5 KB)  
Hello Dylim , this is the script but it wasn’t working . did I do anything wrong here

---

<div class="post-metadata">

**Author:** ![dylim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dylim/32/121211_2.png) [@dylim](https://forum.dynamobim.com/u/dylim)\
**Post date:** [March 7, 2022, 8:41am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/8 "2022-03-07T08:41:22Z")

</div>

Please share your family.  
I will take a look when i am free.

---

<div class="post-metadata">

**Author:** ![ahmadkhalaf7892](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ahmadkhalaf7892/32/131910_2.png) [@ahmadkhalaf7892](https://forum.dynamobim.com/u/ahmadkhalaf7892)\
**Post date:** [March 7, 2022, 8:42am UTC](https://forum.dynamobim.com/t/rotating-mutliple-families/74012/9 "2022-03-07T08:42:59Z")

</div>

[Rectangular Pile Sheet Foundation .rfa](https://forum.dynamobim.com/uploads/short-url/yKVrl2Er0uRRoqjxB6bLOCoVZKv.rfa) (352 KB)  
Thanks a lot
