# Pipe Fitting Rotation Around Pipe

**URL:** <https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668>\
**Category:** Revit\
**Tags:** revit\
**Created:** [February 16, 2017, 1:21pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668 "2017-02-16T13:21:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [February 16, 2017, 1:21pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/1 "2017-02-16T13:21:39Z")

</div>

I have been struggling to figure out how I could rotate a pipe fitting, at specified degrees, around the axis of pipe. The OOTB box FamilyInstance.SetRotation node does not allow you to specify an axis, and I have been unable to successfully figure out how to properly use any of the other available rotation nodes. I appreciate any help and advice anyone could offer. Thank you.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [February 16, 2017, 3:32pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/2 "2017-02-16T15:32:35Z")

</div>

Hi @jmmiller

Rotating families aling axis has been discussed many times on forum. You could search on forum search bar. Here is one of the topic [Rotate family after insert along curve to the tangent](https://forum.dynamobim.com/t/rotate-family-after-insert-along-curve-to-the-tangent/7881/8?u=kulkul)

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [February 16, 2017, 7:08pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/3 "2017-02-16T19:08:46Z")

</div>

Thank for the reply Kulkul. You are correct many discussions on this topic are on this forum. I have been trying to review them. However, I think most of them are tying to do something far more complex than I am, so they are difficult to follow. At least for a Dynamo novice such as myself. I just simply want to be able to rotate a pipe fitting around an axis of the center of a pipe. See attached image for an example of what I am wanting to accomplish. The goal being to eliminate the need to cut a section view and enter the traditional rotate command to rotate a pipe fitting say 45 degrees such as in the attached image.

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/7/f/7faef032b3440643119e3bc9ee044b38bb672436.JPG)

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [March 2, 2017, 3:58pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/4 "2017-03-02T15:58:08Z")

</div>

I am trying to develop a Dynamo file that will give me the rotation I am looking for in the image of the above post. I am currently utilizing the Rotate Family node form Archi-lab, but I can not seem to produce any type of rotation at all. If anyone could point me in the right direction it would be greatly appreciated.

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

---

<div class="post-metadata">

**Author:** ![Ben\_Veasey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_veasey/32/15775_2.png) [@Ben\_Veasey](https://forum.dynamobim.com/u/Ben_Veasey)\
**Post date:** [March 3, 2017, 10:18am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/5 "2017-03-03T10:18:50Z")

</div>

This would be very useful.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 3, 2017, 10:51am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/6 "2017-03-03T10:51:22Z")

</div>

Are you looking to rotate only your pipe fitting?

[![](https://dl.dropboxusercontent.com/s/otjzjgcdcx3w5cx/Rotate.gif?dl=0) ](https://dl.dropboxusercontent.com/s/otjzjgcdcx3w5cx/Rotate.gif?dl=0)

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [March 3, 2017, 11:37am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/7 "2017-03-03T11:37:21Z")

</div>

Kulkul

Initially I want to be able to just rotate the fitting, with the hopes of eventually being able to rotate the fitting and a length of pipe coming out of the tee. The goal is to be able to model rolled fittings for piping offsets within floor plan views. It is very time consuming to have to cut a section then enter the traditional rotate command to rotate the fitting to the desired angle.

I notice you are using a Python script in your demo. Can the demonstrated rotate not have been accomplished with any of the available nodes? I am still relatively new to Dynamo and trying to learn what is possible with nodes and what requires Python scripting to accomplish.

---

<div class="post-metadata">

**Author:** ![Ben\_Veasey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_veasey/32/15775_2.png) [@Ben\_Veasey](https://forum.dynamobim.com/u/Ben_Veasey)\
**Post date:** [March 3, 2017, 11:44am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/8 "2017-03-03T11:44:19Z")

</div>

Looks perfect! Would it be possible to see the Python code? Thanks

---

<div class="post-metadata">

**Author:** ![c.barribaud](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@c.barribaud](https://forum.dynamobim.com/u/c.barribaud)\
**Post date:** [March 5, 2017, 5:13pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/9 "2017-03-05T17:13:50Z")

</div>

kukul,

could you share it ?

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 6, 2017, 1:59am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/10 "2017-03-06T01:59:48Z")

</div>

@jmmiller @c.barribaud @Ben_Veasey Sorry i didn’t receive your messages for some reason. If you need to reply me anything please add “@” in front of name like this “@Kulkul”.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 6, 2017, 2:27am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/11 "2017-03-06T02:27:35Z")

</div>

Here is the DYN file [Rotate PipeFitting.dyn](https://forum.dynamobim.com/uploads/short-url/3xOUAd4eaR6sJFkIkhqrkKl2e2e.dyn) (3.7 KB)

> [@jmmiller](#):
>
> Initially I want to be able to just rotate the fitting, with the hopes of eventually being able to rotate the fitting and a length of pipe coming out of the tee.

@jmmiller Ok, Let me see if i can do this for you.

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [March 6, 2017, 7:48am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/12 "2017-03-06T07:48:50Z")

</div>

> [@Kulkul](#):
>
> if i can do this for you

@c.barribaud, @Ben_Veasey, @jmmiller  
Wouldn’t it also be interesting to understand how it works and what has to be done in order to achieve this?

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [March 6, 2017, 4:11pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/13 "2017-03-06T16:11:13Z")

</div>

@Kulkul

Thank you for providing the DYN file. I have tried to recreate the same demonstration you provided in an earlier post but did not get the desired results. After running the dynamo file you provided, my fitting was deleted, the pipe was copied and moved dramatically. the Pipe also increased in length dramatically as well. Please see images. Must I perform some sort of prep work before attempting to rotate the fitting? Thank you for any further assistance you are willing to provide.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/32500a99749a6adfabc46595093f19d458c28a2a.JPG) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/d/5d66933f21c705035f444fda9a78b5705d519139.JPG)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 6, 2017, 4:15pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/14 "2017-03-06T16:15:20Z")

</div>

@jmmiller You should select only fitting. Show image of your graph.

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [March 6, 2017, 4:50pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/15 "2017-03-06T16:50:03Z")

</div>

@Kulkul

This is my graph. It is essentially the same one you provided.

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/f/8/f869f55ad285d8dcea7414a31f88b2abb7fed70a.JPG)

---

<div class="post-metadata">

**Author:** ![Ben\_Veasey](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ben_veasey/32/15775_2.png) [@Ben\_Veasey](https://forum.dynamobim.com/u/Ben_Veasey)\
**Post date:** [March 6, 2017, 4:57pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/16 "2017-03-06T16:57:24Z")

</div>

It is a great starting point. It would be better if we could pick the axis of rotation (2 points).

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 6, 2017, 5:16pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/17 "2017-03-06T17:16:14Z")

</div>

@jmmiller It is working fine from my side. I don’t understand why it doesn’t work for you.

[![](https://dl.dropboxusercontent.com/s/gh9pd1q360bfraf/Rotate%20With%20Fittings.gif?dl=0) ](https://dl.dropboxusercontent.com/s/gh9pd1q360bfraf/Rotate%20With%20Fittings.gif?dl=0)

---

<div class="post-metadata">

**Author:** ![jmmiller](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jmmiller](https://forum.dynamobim.com/u/jmmiller)\
**Post date:** [March 6, 2017, 5:47pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/18 "2017-03-06T17:47:27Z")

</div>

@Kulkul

See attached for the test file I am using as well as the graph I was using. As far as I can tell we are trying to do exactly the same thing. If it helps I am running Dynamo version 1.2.1.3089 and Revit build version 2017.1.

[Rotate Fitting Test.rvt](https://forum.dynamobim.com/uploads/short-url/rMLYQhmrj7mLKksDZY9W7kpF4gl.rvt) (1.8 MB)  
[Rotate PipeFitting\_JMM.dyn](https://forum.dynamobim.com/uploads/short-url/bszSO056DakPwg9yVoNBPCHG4ga.dyn) (3.7 KB)

---

<div class="post-metadata">

**Author:** ![Jason\_Seck](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jason_seck/32/203743_2.png) [@Jason\_Seck](https://forum.dynamobim.com/u/Jason_Seck)\
**Post date:** [March 6, 2017, 6:55pm UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/19 "2017-03-06T18:55:59Z")

</div>

I had the same problem as jmmiller.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [March 7, 2017, 3:13am UTC](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668/20 "2017-03-07T03:13:47Z")

</div>

@jmmiller i saw your rvt file. You have imperial units. Script works only for metric at the moment. I will update soon for imperial.

[Next page](https://forum.dynamobim.com/t/pipe-fitting-rotation-around-pipe/9668.md?page=2)
