# Duct/Pipe/Cable Tray offset

**URL:** <https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614>\
**Category:** Revit\
**Tags:** mep\
**Created:** [January 25, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614 "2022-01-25T16:01:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![george.kaline](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/george.kaline/32/130549_2.png) [@george.kaline](https://forum.dynamobim.com/u/george.kaline)\
**Post date:** [January 25, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/1 "2022-01-25T16:01:32Z")

</div>

Hello all,

I have been working on a script to help with clashes in models. I am not looking for any automation of fixing clashes because I want the users to see the clash. Ideally the user would slice the object in two places. Select the middle element and apply an offset and angle(45 or 90).

That would be the end goal but I understand baby steps are usually the best way to go.

Currently the script draws the lines from the duct point but does not model the duct. I believe the issue is in the Duct.rectangle.Bylines node. Not that this is MEPovers issue but something in my revit is fighting this node from working correctly. Ideally it would also connect the ducts with fittings and

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/7/07ef938201abe9b878659b9779d9af0de4fab342.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/4/b48faf646fdfff4bd9b7f03d7baeddd987a9837e.png)

This will eventually have a UI(datashapes) but I want to get the concept working first.

Here is the full script image:

 ![test3_2022-01-25_09-42-39](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/32544d5523e766b3a7eada7a71ef2b40e922dfde.png)

[test3.dyn](https://forum.dynamobim.com/uploads/short-url/xOCveVCYKBA6AJfaAxvvYwWlHwP.dyn) (89.1 KB)

If anyone could offer some words of wisdom or help out with a piece of this. It would be greatful.

@sovitek

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [January 25, 2022, 4:11pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/2 "2022-01-25T16:11:59Z")

</div>

> [@Element.GetFromLinkedFIle by StreamNodes package doesn.t work for invalid input](https://forum.dynamobim.com/t/element-getfromlinkedfile-by-streamnodes-package-doesn-t-work-for-invalid-input/72458/3):
>
> As the warning says “The input should be a valid variable name, without spaces.” Valid in this case means not an existing system level variable or class name. Anything that shows in a different color is already taken, Category for example. The other two have spaces in them.

---

<div class="post-metadata">

**Author:** ![george.kaline](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/george.kaline/32/130549_2.png) [@george.kaline](https://forum.dynamobim.com/u/george.kaline)\
**Post date:** [January 25, 2022, 4:30pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/3 "2022-01-25T16:30:24Z")

</div>

So I renamed the DuctTypes to ductTypes and the error goes away but I still get a null result.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [January 25, 2022, 4:35pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/4 "2022-01-25T16:35:00Z")

</div>

You’ll have to post a better image with the node names and preview bubbles visible so we can see what’s going on.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 26, 2022, 6:07am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/5 "2022-01-26T06:07:42Z")

</div>

Hi @george.kaline …happy the node from mepower works for you now…here is an example how it could be done it could be a start for you, it will work on rect ducts but very easy could work on round duct and pipes but not Cabletray the split tool doesnt support that so here we had to rebuild the whole run…run it from player for avoid element binding…give it a try 😉

 ![GEORGE DYNAMO_2022-01-26_07-01-49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/440e9f2d14adc90e602c7bfa76142dee291d7363.png)

 ![Screenshot 2022-01-16 075902](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/f/cf8d43fcef610a074f7530e3f35437909b373745.png)

---

<div class="post-metadata">

**Author:** ![george.kaline](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/george.kaline/32/130549_2.png) [@george.kaline](https://forum.dynamobim.com/u/george.kaline)\
**Post date:** [January 27, 2022, 12:15am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/6 "2022-01-27T00:15:27Z")

</div>

Thanks @sovitek for the graph. I was able to get it working.

I can get the other duct and pipe types to work so thank you for this.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 27, 2022, 7:25am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/7 "2022-01-27T07:25:25Z")

</div>

Here is a way for 45 degree…as you ask for in PM …can probably be made smarter, but is what i had time for now…

 ![GEORGE DYNAMO_2022-01-26_07-01-49](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1b99a7348ad2b4c14faf7d753be59bbbc7ee8113.jpeg)

 ![Screenshot 2022-01-14 121817](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/42e6ea17dd5948a3225672d59c8bb01135eaca9f.png)

---

<div class="post-metadata">

**Author:** ![george.kaline](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/george.kaline/32/130549_2.png) [@george.kaline](https://forum.dynamobim.com/u/george.kaline)\
**Post date:** [January 28, 2022, 1:34pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/8 "2022-01-28T13:34:33Z")

</div>

@sovitek Your a genius. Thank you so much!

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 28, 2022, 2:12pm UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/9 "2022-01-28T14:12:57Z")

</div>

hæhæ thanks for that label please share that with my boss 😉 😉 happy you can use it…

---

<div class="post-metadata">

**Author:** ![pieterdewaal](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@pieterdewaal](https://forum.dynamobim.com/u/pieterdewaal)\
**Post date:** [September 7, 2022, 7:07am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/10 "2022-09-07T07:07:54Z")

</div>

@sovitek Would it be possible to share the .dyn file? We’re having some trouble determining how the nodes are connecting from the image and find the idea of such a script fascinating and very useful! Thanks in advance.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [September 7, 2022, 7:51am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/11 "2022-09-07T07:51:48Z")

</div>

Continuing the discussion from [Duct/Pipe/Cable Tray offset](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/8):

Thank you…please make a new topic and show an image with all nodes expended, and i will try to help you 😉

---

<div class="post-metadata">

**Author:** ![WSAMAN](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@WSAMAN](https://forum.dynamobim.com/u/WSAMAN)\
**Post date:** [March 30, 2024, 9:37am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/12 "2024-03-30T09:37:36Z")

</div>

Please Share Scrip Dynamo? Thanks you.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/9/49c3d9dc7f29832981c958d75c1368d3053ea1da.jpeg)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [March 30, 2024, 9:41am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/13 "2024-03-30T09:41:32Z")

</div>

Hello isnt it what i already do ?? try as showed and if you go stuck please create a new topic and share a image,dyn,rvt and the community can try help

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [April 4, 2024, 7:07am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/17 "2024-04-04T07:07:06Z")

</div>

Hello @WSAMAN i dont have so much time right now…please create a new topic and show an image with your graph with all nodes expanded so we can see whats goin on…you know this method i try is a couple of year old and i will probably do it another way today…play around with it and find out where the issue is and fix it…good luck

---

<div class="post-metadata">

**Author:** ![WSAMAN](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@WSAMAN](https://forum.dynamobim.com/u/WSAMAN)\
**Post date:** [April 4, 2024, 7:20am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/18 "2024-04-04T07:20:12Z")

</div>

Dear K. [**Sovitek**](https://forum.dynamobim.com/u/sovitek)

Thanks you.

Best Regards.

---

<div class="post-metadata">

**Author:** ![WSAMAN](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@WSAMAN](https://forum.dynamobim.com/u/WSAMAN)\
**Post date:** [April 4, 2024, 7:21am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/19 "2024-04-04T07:21:16Z")

</div>

> [@sovitek](#):
>
> Hello @WSAMAN i dont have so much time right now…please create a new topic and show an image with your graph with all nodes expanded so we can see whats goin on…you know this method i try is a couple of year old and i will probably do it another way today…play around with it and find out where the issue is and fix it…good luck

Thanks you.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [April 4, 2024, 8:31am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/20 "2024-04-04T08:31:22Z")

</div>

here is a very fast example for 90 almost the same for 45, just some math 😉 try it and play around with it…  
 ![Revit_DK9HZZFlYF](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/2/e28e553137093531e04cedfb9b1c70b8d1c194dd.gif)  
[Home.dyn](https://forum.dynamobim.com/uploads/short-url/4jcTYdYEm8LcG9eAUwXhYWkb7wX.dyn) (76.7 KB)

 ![Skærmbillede 2024-04-04 103656](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/a/ba0cc2f93be5468706b4dcdf6951de6e7f6f31e9.png)

---

<div class="post-metadata">

**Author:** ![WSAMAN](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@WSAMAN](https://forum.dynamobim.com/u/WSAMAN)\
**Post date:** [April 4, 2024, 10:04am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/21 "2024-04-04T10:04:33Z")

</div>

Can it be made at a 45 degree angle like this?

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

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [April 4, 2024, 10:08am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/22 "2024-04-04T10:08:46Z")

</div>

yes sure, just create the routing for 45 degree instead of 90…just math 😉 😉

---

<div class="post-metadata">

**Author:** ![WSAMAN](https://avatars.discourse-cdn.com/v4/letter/w/96bed5/32.png) [@WSAMAN](https://forum.dynamobim.com/u/WSAMAN)\
**Post date:** [April 4, 2024, 11:02am UTC](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614/23 "2024-04-04T11:02:37Z")

</div>

Could you please share the scrip dynamo?

[Next page](https://forum.dynamobim.com/t/duct-pipe-cable-tray-offset/72614.md?page=2)
