How to connect a horizontal cable tray with a vertical cable tray by Revit API

How to connect a horizontal cable tray with a vertical cable tray by Revit API

Anonymous
Not applicable
4,927 Views
12 Replies
Message 1 of 13

How to connect a horizontal cable tray with a vertical cable tray by Revit API

Anonymous
Not applicable

Hi, 

In following picture, there is a horizontal cable tray, and I want to draw a vertical cable tray starting from the middle point of the horizontal cable tray. when I use Revit ribbon drawing function, the horizontal cable tray and the vertical cable connect very well. But I am sure the horizontal cable tray is not split by the vertical cable tray, and an extra connector is added to the horizontal cable tray on the middle point, and a connection is made between this added connector from the horizontal cable tray and one end connector from the vertical cable tray. And no tee fitting is added.

QQ截图20181129161934.png

Revit didn't create a tee fitting, but the horizontal cable tray and the vertical cable tray do connect well even there is no tee fitting. I don't know why.

 

When I use NewTeeFitting method to do it, it return null directly. I have also tried NewTakeoffFitting API, but it gave an exception and said: you can't use NewTakeoffFitting API for cable tray connection. 

 

See issue in Revit API forum:

https://forums.autodesk.com/t5/revit-api-forum/how-to-connect-a-horizontal-cable-tray-with-a-vertica...

 

How can I do that by Revit API? 

 

Best Regards,

 Zhangzg

0 Likes
4,928 Views
12 Replies
Replies (12)
Message 2 of 13

jeremytammik
Autodesk
Autodesk

You say you use the Revit ribbon drawing function. 

 

What is the exact result of that?

 

What elements are placed and what connections generated?

 

Do you want to achieve the exact same result programmatically?

   

Cheers,

 

Jeremy.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 13

Anonymous
Not applicable

Hi  

 

 

 

Best Regards,

Zhangzg

 

 

0 Likes
Message 4 of 13

jeremytammik
Autodesk
Autodesk

@aignatovich showed you how to connect a horizontal cable tray with a vertical on in the other thread of yours:

 

https://forums.autodesk.com/t5/revit-api-forum/how-to-connect-a-horizontal-cable-tray-with-a-vertica...

 

Why do you not accept his solution?

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 13

Anonymous
Not applicable

Hi  

 

I have read @aignatovich 's reply. His solution is only used for two horizontal cable trays but not a vertical and a horizontal cable tray. I have explained this in my reply to him. 

 

But I want to know how to connect a horizontal cable tray with a vertical cable tray by API.

 

Best Regards,

Zhangzg

0 Likes
Message 6 of 13

jeremytammik
Autodesk
Autodesk

Oh, I misunderstood his description. 

 

I am checking now with the development team for a solution.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 13

jeremytammik
Autodesk
Autodesk

The development team replied, and the news is not very promising, I'm afraid:

 

First, one person said: I believe the work around is similar to plumbing fixtures in that you need to:

 

  • Set the location of the existing element requiring a split to a new line from the old start point to the point on a T connector at the intersection point
  • Create a new element from the T connector to the old elements endpoint.
  • Create the vertical from the T connector to the next desired termination point.

There are several Python based examples of this for pipes on the Dynamo forums.

 
A second person added: Just double checked with team, for cable tray in this case, it is connected with another cable tray through curve connector. Currently there is no API to create a curve connector directly like this.

 

Please raise a wish list item for this in the Revit Idea Station.

 

Thank you!

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 8 of 13

Anonymous
Not applicable

Hi  

 

Thank you so much for your careful reply.

 

I agree with the second person: for cable tray in this case, it is connected with another cable tray through a curve connector, but currently there is no API to create a curve connector directly like this. In fact, in this case a curve connector is added at a middle point of the horizontal cable tray.

 

I will post a item in Revit Idea Station.

 

Thank you again, and I often read your blog: https://thebuildingcoder.typepad.com/blog/about-the-author.html, It is very helpful.

 

Best Regards,

Zhigang Zhang

0 Likes
Message 9 of 13

jeremytammik
Autodesk
Autodesk

Dear Zhigang Zhang,

 

Will the following connection satisfy your requirement?

 

cable_tray_fitting_tee_vertical_horizontal.png

  

 

If so, API support is available, since this solution uses a normal fitting rather than a curve connection. 

 

If you don't want the fitting, we may need API support for the curve connector first.

 

I hope this helps.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 10 of 13

Anonymous
Not applicable

Hi  

 

Thank you so much for your reply.

 

Yes, the connection with a normal tee fitting can satisfy my requirement, and it looks very well.

 

I know in some cable tray types there are several proper tee fittings for T-connection, and then no API support is needed. But in some other cable tray types there are no proper tee fittings for T-connection, so we have to use a curve connection.

 

 

 

Best Regards,

Zhigang Zhang

0 Likes
Message 11 of 13

jeremytammik
Autodesk
Autodesk

I am confused by the parallel conversations in these two threads:

 

 

It would be nice if they could be summarised and unified...

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 12 of 13

jeremytammik
Autodesk
Autodesk

Did you ever submit that wish to the Revit Idea Station?

 

Can you provide a link to that, please?

 

Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 13 of 13

Anonymous
Not applicable

Hi  

 

Thanks for your reply!

 

I have submitted a wish to the Revit Idea Station, and the link is as follow:

https://forums.autodesk.com/t5/revit-ideas/provide-api-to-create-a-curve-connector/idi-p/8774958

 

Best Regards,

Zhangzg

0 Likes