Tee Fitting with no right-angle

Tee Fitting with no right-angle

AnatolyCEL
Enthusiast Enthusiast
2,557 Views
9 Replies
Message 1 of 10

Tee Fitting with no right-angle

AnatolyCEL
Enthusiast
Enthusiast

teeConnect.png

 

Hello,

I need to connect branch pipe to main pipe with Tee Fitting by API, like in the picture. Branch pipe must have angle 45 degrees to main pipe. When I try to do it, I have exception about too small or too large angle. So I have to make several steps:

  1. Create branch pipe perpendicular to main pipe

public static Pipe Create(

     Document document,

     ElementId systemTypeId,

     ElementId pipeTypeId,

     ElementId levelId,

     XYZ firstPoint,

     XYZ secondPoint

)

 

  1. Create Tee Fitting

public FamilyInstance NewTeeFitting(     Connector connector1,     Connector connector2,     Connectorconnector3)

 

  1. Disconnect branch pipe from this fitting

public void DisconnectFrom(     Connectorconnector)

 

  1. Rotate the branch pipe

public bool Rotate(     Line axis,     doubleangle)

 

  1. Connect again

public void ConnectTo(     Connectorconnector)

 

  1. Change symbol of the fitting 2 times to see effect at the draw

public FamilySymbol Symbol { get; set; }

 

Question: Is it possible to do it easier?

Thanks.

0 Likes
Accepted solutions (2)
2,558 Views
9 Replies
Replies (9)
Message 2 of 10

Aaron.Lu
Autodesk
Autodesk
Dear,

Did you do this:
1. Create branch pipe with the right angle.
2. call NewTeeFitting to create the fitting.
3. change fitting type.

Or
1. create branch pipe
2. rotate branch pipe
3. create fitting via NewTeeFitting
4. change fitting type
Or
Or
1. create branch pipe
2. rotate branch pipe
3. create fitting via NewFamilyInstance
4. call Connector.ConnectTo several times to connect fitting with pipes
4. change fitting type


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 10

AnatolyCEL
Enthusiast
Enthusiast

Hello,

 

I do:

1. Create branch pipe with the right angle (if I try to create with 45 degrees, NewTeeFitting throws exception "too smal or too large angle")

2. call NewTeeFitting to create the fitting.

3. Disconnect the branch pipe from the fitting (if rotate the pipe without disconnecting, commit transaction give the message and disconnect itself)

4. Rotate the branch pipe

5. Connect back the branch pipe to the fitting (connection is done, but is not visual effect in drawing)

6. To get the visual effect in drawing, change fitting type to any type different from required and change again back to required type.

 

It seems to long way, maybe it's possible easier?

0 Likes
Message 4 of 10

Aaron.Lu
Autodesk
Autodesk
Accepted solution
We have an issue ticket for this:
REVIT-58630 NewTeeFitting method fails with 45 degree angle

So I think another way you can try is to call NewFamilyInstance to create the tee and rotate it then connect to each pipe.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 5 of 10

AnatolyCEL
Enthusiast
Enthusiast

Hello,

 

Has the issue (REVIT-58630 NewTeeFitting method fails with 45 degree angle) resolved?

 

Thanks,

Anatoly.

0 Likes
Message 6 of 10

Aaron.Lu
Autodesk
Autodesk
Accepted solution
Hi AnatolyCEL,

sorry, it has not yet been fixed. I'm afraid it might not be included in Revit 2017


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 7 of 10

sniMD547
Contributor
Contributor

Hello,

 

I was wondering if there is any progress regarding this matter. I am using Revit API 2018, and the problem still exists.

 

Kind regards

Message 8 of 10

Anonymous
Not applicable

Has this issue been fixed yet?

 

BTW is there a URL where I can monitor the progress of this issue (REVIT-58630)?

0 Likes
Message 9 of 10

carolina.machado
Advocate
Advocate

Has this issue been fixed yet?

0 Likes
Message 10 of 10

Chuong.Ho
Advocate
Advocate

Oh my god, this is a problem has 8 year, may be need to hack it 😗

Chuong Ho

EESignature