NewUnionFitting method changes the length of pipe

NewUnionFitting method changes the length of pipe

kmalovanyk
Contributor Contributor
279 Views
2 Replies
Message 1 of 3

NewUnionFitting method changes the length of pipe

kmalovanyk
Contributor
Contributor

For example, if I have a pipe with 1000 mm, I divide it into two pipes by 500mm, and after using NewUnionFitting, my pipes will be less than 500. This is because I am inserting a fitting and it has its own length.
But  I want to create the first pipe with 500mm, and the second with (1000 mm - 500 mm(first pipe) - the length of the fitting).


My question is, how to get the length the fitting needs before using the NewUnionFitting() method? To take it into account before creating my first pipe.

0 Likes
280 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

This sounds like a question that is best answered from the end user point of view first, before you start thinking about any programming issues. The Revit API does not provide any functionality to determine this that is not available in the UI. Maybe the routing preferences will help?

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

ricaun
Advisor
Advisor

That's a good question, I believe the best approach should be to create two temporary Pipes and create Union to create a FamilyInstance in the project.


With FamilyInstance it's easy to find the Connectors, the distance between the connectors is the length you need.


Depending on how the Union Family is created, the diameter can change the distance between the connectors or the Union is not symmetrical, so is a good idea to consider these cases.

 

I hope this gives you a good direction. See yaa!

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes