Connect transition to another fitting and force it to regenerate

Connect transition to another fitting and force it to regenerate

adam.krug
Advocate Advocate
849 Views
5 Replies
Message 1 of 6

Connect transition to another fitting and force it to regenerate

adam.krug
Advocate
Advocate

I have a 50 mm x 110 mm transition, 40 mm elbow and 110 mm pipe. When I connect all with

connector.ConnectTo(anotherConnector)

Everything gets connected but the trouble is that the transition family won't regenerate until I e.g. manually drag a pipe a little bit, only then it changes to 40 x 110 mm transition.

 

Is there any simple way to achieve the regeration via API?

 

PS:

doc.Regenerate() 

won't do the job

 

I know I could instead delete my transition and create a new one using 

Document.NewTransitionFitting()

 but I hoped I could skip such a hassle.

0 Likes
850 Views
5 Replies
Replies (5)
Message 2 of 6

ricaun
Advisor
Advisor

Hello @adam.krug 

 

Only using the ConnectTo does not make Revit create the Elbow you need create between the 2 connectors.

 

Using the NewElbowFitting method. Something like this:

 

connector.ConnectTo(anotherConnector)
document.Create.NewElbowFitting(connector, anotherConnector);

 

This gonna force Revit to create the Elbow.

 

See yaa!

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 3 of 6

adam.krug
Advocate
Advocate

hello @ricaun ,

 

I want to connect and regenerate/recalculate an existing transition... With existing bend on one side, and existing pipe on another side.

0 Likes
Message 4 of 6

ricaun
Advisor
Advisor

I miss understood what you mean with the method NewTransitionFitting.

 

I believe is not possible to regenerate the document with the two connectors connected and make the Fitting appear automatically.

 

You need to use the Fitting methods. I supposed this gonna work.

 

connector.ConnectTo(anotherConnector)
document.Create.NewTransitionFitting(connector, anotherConnector);

 

See yaa

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 5 of 6

Kevin.Lawson.PE
Advocate
Advocate

Yes, this was my finding as well.  You have to manually place the transition.  Get the midpoint between the two connectors you are trying to transition to/from, place a transition there, align the connectors, then connect.  

-Kevin Lawson, PE
www.rippleengineeringsoftware.com
Revit heating and cooling load calculations in one click!
0 Likes
Message 6 of 6

adam.krug
Advocate
Advocate

that's not good news but thanks @Kevin.Lawson.PE  & @ricaun  .

0 Likes