Connect pipes

Connect pipes

Anonymous
Not applicable
2,595 Views
10 Replies
Message 1 of 11

Connect pipes

Anonymous
Not applicable

Hi,

 

I want to connect two pipes similar to trim tool in revit.

 

How do I programatically call trim command. 

 

Thanks & Regards

0 Likes
2,596 Views
10 Replies
Replies (10)
Message 2 of 11

jeremytammik
Autodesk
Autodesk
0 Likes
Message 3 of 11

Anonymous
Not applicable

Diidn't understand what was googled for me.

 

A simple question I have two pipes pipe1 and pipe2

 

Neither of them works successfully to connect two pies:

 

1. doc.Create.NewElbowFitting(c1end,c2start);

 

2.c1end.ConnectTo(c2start);

 

c1end is the connctor of pipe1 and c2start is the connector of pipe2

0 Likes
Message 4 of 11

jeremy_tammik
Alumni
Alumni

What happens if you connect them manually in the user interface?

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

Anonymous
Not applicable

They simply get connected.

0 Likes
Message 6 of 11

jeremy_tammik
Alumni
Alumni

Good. Your solution 2. should produce the same result.

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

Anonymous
Not applicable
No it does not.
0 Likes
Message 9 of 11

Anonymous
Not applicable

The image below will clarify things:

Tried: 

try
{
c1end.ConnectTo(c2start);
Command.doc.Create.NewElbowFitting(c1end, c2start);

}
catch (Exception sdq)
{

 

MessageBox.Show(sdq.Message.ToString());
}

 

Tried Thsi:

try
{
Command.doc.Create.NewElbowFitting(c1end, c2start);

}
catch (Exception sdq)
{

 

MessageBox.Show(sdq.Message.ToString());
}

 

 

 tried this

 

 

try
{
c1end.ConnectTo(c2start);

}
catch (Exception sdq)
{

 

MessageBox.Show(sdq.Message.ToString());
}

 

But it creates the fittings between pipes in one place but not at the other.

 

pipes COnnection.png

 

 

 

 

0 Likes
Message 10 of 11

Anonymous
Not applicable

Where you able to solve this at any point? I'm having the exact same problem and cannot find a solution. 

Message 11 of 11

Jes_Gonzalez
Advocate
Advocate

Any updated information on this would be greatly appreciated. I'm going down the same road.

0 Likes