Setting system type in advance

Setting system type in advance

WhiteSharx
Contributor Contributor
544 Views
5 Replies
Message 1 of 6

Setting system type in advance

WhiteSharx
Contributor
Contributor

Hello!

So I want to change the current type of my piping system from hydronic return to hydronic supply for example before I create my pipe via API. Is it possible?

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

matthew_taylor
Advisor
Advisor

Hello!

If I understand you correctly, you may want to look into SetDefaultElementTypeId.

If that doesn't do what you want, can you be more clear about what you are trying to achieve?

 

-Matt


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 3 of 6

WhiteSharx
Contributor
Contributor

Thanks for the idea, Matt. I looked through the list of ElementTypes that can be set this way and I guess that PipeType is not the appropriate one for setting the current SystemType. But you got the principle right.

Literally I want to change the SystemType like choosing it from the dropdown list in attachment picture but via API. Or in other words is there a way to appoint the SystemType for pipe being created during its creation or right before it but not afterwards?

0 Likes
Message 4 of 6

WhiteSharx
Contributor
Contributor

By the way, I can't find a way for setting SystemType to Undefined (like selecting the whole system by Tab and then pressing Delete key). Is it possible only by deleting a system from DB?

0 Likes
Message 5 of 6

matthew_taylor
Advisor
Advisor

Hi @WhiteSharx,

One of the

DB.Plumbing.Pipe.Create

overloads allows putting the sytemTypeId in: http://www.revitapidocs.com/2017/9550265f-5760-3c28-d023-d0373285855b.htm

You'll need to find a pipe system type with the appropriate MEPSystemClassification to use for the elementId.

 

I'd recommend using Revit Lookup on an existing pipe with the same types that you want, and hard coding some of the element IDs in to test you get what you want before you proceed to using filteredelementcollectors to find each component/type. Take note of what exceptions you get (if any), and look at the link above to analyse the error.

 

-Matt

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 6 of 6

matthew_taylor
Advisor
Advisor

Oh, and the AutoRoute sample in the SDK looks like it should be an immediate reference!


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes