Revit API

Reply
Member
sppeeddyy
Posts: 3
Registered: ‎01-31-2012
Message 1 of 5 (610 Views)

Pipe / Duck spliting using the Revit API

610 Views, 4 Replies
01-31-2012 06:19 AM

Hi

 

I have a C# code that allows users to select a pipe or a duct and can retrieve the lenght property from it. Since I am new to Revit API, I was wondering is there a way to spilt a pipe/duct into specified length. For example, if I have a 50" pipe, I need to split it into 5 pipes of 10" each.

 

I would greatly appreciate any input. Thanks in advance.

Distinguished Contributor
ollikat
Posts: 144
Registered: ‎04-01-2011
Message 2 of 5 (596 Views)

Re: Pipe / Duck spliting using the Revit API

02-01-2012 10:09 PM in reply to: sppeeddyy

As far as I know, there's no single method for doing the split in API. If you are going to do your own split method, you have to consider following steps

 

1. disconnect pipe/duct (curve) from the other end if connected

2. disconnect possible tap connections (and store them some how)

3. shorten the curve

4. Create new curve and place it correctly plus connect the other end if needed

5. set similar parameter values that was in original curve

6. reconnect the taps to correct curve

 

Optionally you can delete the old curve totally and create two new.

 

So as you can see, it's not the worlds simplest task to do and that's why I think it doesn't make sense to start copy-paste code here. So just go ahead and start coding :-) If you face some issues, let see if someone can help you with those.

Member
sppeeddyy
Posts: 3
Registered: ‎01-31-2012
Message 3 of 5 (590 Views)

Re: Pipe / Duck spliting using the Revit API

02-02-2012 08:08 AM in reply to: ollikat

Thank you for your suggestion. I have started working on the steps you mentioned since it makes complete sense. However, I was wondering if there a way to create new pipe filter, eg. coupling, which is used in Revit to spilt a pipe? If I could somehow create a new pipe coupling then I can place it at a defined lenght on a pipe. If possible, kindly provide a sample code for creating a new coupling.

 

Please let me know your thoughts on this. Thank you!

Distinguished Contributor
ollikat
Posts: 144
Registered: ‎04-01-2011
Message 4 of 5 (584 Views)

Re: Pipe / Duck spliting using the Revit API

02-02-2012 10:36 PM in reply to: sppeeddyy

I wonder if you mean union? That's a good idea but unfortunatelly doesn't make our life easier. Union is created with Document::NewUnionFitting() method and it takes two connectors. So before you can install union, you have to have two ducts with open ends.

Member
sppeeddyy
Posts: 3
Registered: ‎01-31-2012
Message 5 of 5 (571 Views)

Re: Pipe / Duck spliting using the Revit API

02-07-2012 02:54 PM in reply to: ollikat

Thanks! I am looking for a flang and union kind of deal. I would appreciate if someone could provide more explanation on union and flages and the best logic to accomplish it.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit

Twitter

Facebook

Blogs

Youtube