Create a Generic Pipe: What should the 2nd parameter be?

Create a Generic Pipe: What should the 2nd parameter be?

Anonymous
Not applicable
359 Views
3 Replies
Message 1 of 4

Create a Generic Pipe: What should the 2nd parameter be?

Anonymous
Not applicable

Hello

 

I am trying to create my own Pipe and add it to the current document using Pipe.Create();. The pipe I am trying to create is very generic, I am not concerned about the pipe type/material or even level. All I am concerned about is the start and end XYZ points which I know.

 

My Problem: I am not sure what some parameters of Pipe.Create(); should be. See below for the parameters I am unsure how to specifty...

 

public static Pipe Create(
	Document document,
	ElementId systemTypeId,  What do I specify here for a generic (maybe PVC) pipe?
	ElementId pipeTypeId,  What do I specify here for a generic pipe?
	ElementId levelId,        What do I specify here for a generic pipe?
	XYZ firstPoint,
	XYZ secondPoint
)

Are there enumeration variables for a generic pipe system, and a generic pipe type?

 

My code:

 

// Maybe there are variables like StructuralType.NonStructural, ie, PlumbingType.Generic??
Pipe pipe = Pipe.Create(doc, PipingSystemType.Generic, PipeType.Generic, levelId.Generic, strt, end);

 

0 Likes
360 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Those values need an Element Id value. There aren't enum values you can use.

 

I'd suggest using the NewPipe() method of the Autodesk.Revit.Creation.Document class. It still requires a PipeType, but that is the only parameter you need besides the start and end. See the sample code in the wikihelp here:

 

http://wikihelp.autodesk.com/Revit/enu/2014/Help/3665-Developers/0122-Disciple122/0131-Revit_ME131/0...

 

HTH,

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks

 

doc.Create.NewPipe() did the trick 🙂

 

Out of interest what are the different PipeSystem's and PipeSystemTypes available. Doesn't seem to be documented in the Revit Aquinox API.chm document.

 

So far the only types I know of are "Standard".

0 Likes
Message 4 of 4

Anonymous
Not applicable

Glad it worked. I don't know what the PipeSystems or PipeSystemTypes are. You could always create a filter for these classes and see what you get back.

 

0 Likes