Class Pipe
- Namespace
- OpenMEPRevit.Element
- Assembly
- OpenMEPRevit.dll
A pipe in the Autodesk Revit MEP product.
public class Pipe
- Inheritance
-
Pipe
- Inherited Members
Remarks
The pipe is only available in the Autodesk Revit MEP product.
Methods
CreateByConnectorAndPoint(Element, Element, Connector, Point)
create new pipe with start connector and end point
[NodeCategory("Create")]
public static Element? CreateByConnectorAndPoint(Element pipeType, Element level, Connector connector1, Point endPoint)
Parameters
pipeTypeElementthe element type of pipe
levelElementthe element level
connector1Connectorfirst connector to define first pipe draw pipe
endPointPointend point to draw pipe
Returns
- Element
new pipe
Examples

CreateByConnectorAndPoint(Element, Element, Connector, Point, double)
create new pipe with start connector and end point
[NodeCategory("Create")]
public static Element? CreateByConnectorAndPoint(Element pipeType, Element level, Connector connector1, Point endPoint, double diameter)
Parameters
pipeTypeElementthe element type of pipe
levelElementthe element level
connector1Connectorfirst connector to define first pipe draw pipe
endPointPointend point to draw pipe
diameterdoublesize of new pipe
Returns
- Element
new pipe
Examples

CreateByLine(Element, Element, Element, Line)
Create a new pipe by line
[NodeCategory("Create")]
public static Element? CreateByLine(Element systemType, Element pipeType, Element level, Line line)
Parameters
systemTypeElementthe element of pipe system type
pipeTypeElementthe element type of pipe
levelElementelement level
lineLineline to draw pipe
Returns
- Element
new pipe
Examples

CreateByLine(Element, Element, Element, Line, double)
Create a new pipe by line
[NodeCategory("Create")]
public static Element? CreateByLine(Element systemType, Element pipeType, Element level, Line line, double diameter)
Parameters
systemTypeElementthe element of pipe system type
pipeTypeElementthe element type of pipe
levelElementelement level
lineLineline to draw pipe
diameterdoublesize of new pipe
Returns
- Element
new pipe
Examples

CreateByPointAndDirection(Element, Element, Element, Point, Vector, double, double)
create new pipe by direction and length
[NodeCategory("Create")]
public static Element? CreateByPointAndDirection(Element systemType, Element pipeType, Element level, Point startPoint, Vector direction, double length, double diameter)
Parameters
systemTypeElementThe Element of the piping system type.
pipeTypeElementThe Element of the pipe type.
levelElementThe Element level.
startPointPointThe start point of the pipe.
directionVectordirection of new pipe
lengthdoublediameterdoublesize of new pipe
Returns
- Element
new pipe
Examples

CreateByTwoConnector(Element, Element, Connector, Connector)
create new pipe with connectors
[NodeCategory("Create")]
public static Element? CreateByTwoConnector(Element pipeType, Element level, Connector connector1, Connector connector2)
Parameters
pipeTypeElementtype of pipe
levelElementlevel
connector1Connectorfirst connector
connector2Connectorsecond connector
Returns
- Element
new pipe
Examples

CreateByTwoConnector(Element, Element, Connector, Connector, double)
create new pipe with connectors
[NodeCategory("Create")]
public static Element? CreateByTwoConnector(Element pipeType, Element level, Connector connector1, Connector connector2, double diameter)
Parameters
pipeTypeElementtype of pipe
levelElementlevel
connector1Connectorfirst connector
connector2Connectorsecond connector
diameterdoublesize of pipe
Returns
- Element
new pipe
Examples

CreateByTwoPoint(Element, Element, Element, Point, Point)
create new pipe with two points
[NodeCategory("Create")]
public static Element? CreateByTwoPoint(Element systemType, Element pipeType, Element level, Point startPoint, Point endPoint)
Parameters
systemTypeElementThe Element of the piping system type.
pipeTypeElementThe Element of the pipe type.
levelElementThe Element level.
startPointPointThe start point of the pipe.
endPointPointThe end point of the pipe.
Returns
- Element
new pipe
Examples

CreateByTwoPoint(Element, Element, Element, Point, Point, double)
create new pipe with two points
[NodeCategory("Create")]
public static Element? CreateByTwoPoint(Element systemType, Element pipeType, Element level, Point startPoint, Point endPoint, double diameter)
Parameters
systemTypeElementThe Element of the piping system type.
pipeTypeElementThe Element of the pipe type.
levelElementThe Element level.
startPointPointThe start point of the pipe.
endPointPointThe end point of the pipe.
diameterdoublesize of new pipe
Returns
- Element
new pipe
Examples

CreateRouteShortestByPoints(Element, Element, Element, List<Point>, double)
Create pipe shortest route by the list points use TravellingSalesman algorithm
[NodeSearchTags(new string[] { "create", "pipe", "network", "list", "route" })]
[NodeCategory("Create")]
public static List<Element?> CreateRouteShortestByPoints(Element systemType, Element pipeType, Element level, List<Point> points, double diameter)
Parameters
systemTypeElementsystem type of pipe
pipeTypeElementtype of pipe
levelElementlevel of pipe
pointsList<Point>list point ordered of pipe
diameterdoublevalue diameter for create pipe
Returns
- List<Element>
the elements include new pipe and new elbow of route
Examples
EndCap(Element)
Places caps on the open connectors of the pipe curve, pipe fitting or pipe accessory.
public static void EndCap(Element pipe)
Parameters
pipeElementElement of pipe curve, pipe fitting or pipe accessory.
Examples

Remarks
In order to place the cap, the cap type should be defined in the routing preferences that associates with the pipe type of the given element. If the typeId is a valid element id, it will be used to override the pipe type that associates with the pipe type of the given element.
Exceptions
- ArgumentException
The element elemId does not exist in the document -or- The element elemId is neither an object of pipe curve, pipe fitting, nor pipe accessory. -or- The element elemId has no opened piping connector.
- ArgumentNullException
A non-optional argument was null
- InvalidOperationException
this operation failed.
GetCross(Element)
Return Cross Of Pipe In Routing Preferences
public static Element? GetCross(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
cross
Examples

GetDiameter(Element)
return information diameter of pipe
[MultiReturn(new string[] { "OverallSize", "Diameter", "OutsideDiameter", "InsideDiameter" })]
public static Dictionary<string, object?> GetDiameter(Element pipe)
Parameters
pipeElementpipe
Returns
Examples

GetFamilySymbolCapsByRouting(Element?)
return Caps family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolCapsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolCrossesByRouting(Element?)
return Crosses family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolCrossesByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolElbowsByRouting(Element?)
return Elbows family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolElbowsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolJunctionsByRouting(Element?)
return Junctions family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolJunctionsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolMechanicalJointsByRouting(Element?)
return MechanicalJoints family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static Dictionary<string, object?> GetFamilySymbolMechanicalJointsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- Dictionary<string, object>
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolSegmentsByRouting(Element?)
return Segments family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolSegmentsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolTransitionsByRouting(Element?)
return Transitions family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolTransitionsByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetFamilySymbolUndefinedByRouting(Element?)
return Undefined family of pipe get in routing setting
[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolUndefinedByRouting(Element? pipe)
Parameters
pipeElementpipe to get family routing
Returns
- IDictionary
family symbol
Examples

Remarks
it will be help you get correct family junction in setting map with size of pipe
GetRoughness(Element)
Return The roughness of the MEP curve type
public static double GetRoughness(Element pipe)
Parameters
pipeElementpipe
Returns
- double
roughness
Examples

GetTap(Element)
Return Tap Of Pipe In Routing Preferences
public static Element? GetTap(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
tap
Examples

GetTee(Element)
Return Tee Of Pipe In Routing Preferences
public static Element? GetTee(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
tee
Examples

GetTransition(Element)
Return Transition Of Pipe In Routing Preferences
public static Element? GetTransition(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
transition
Examples

GetUnion(Element)
Return Union Of Pipe In Routing Preferences
public static Element? GetUnion(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
union
Examples

MEPSystem(Element)
The system of the MEP curve.
[NodeCategory("Query")]
public static Element? MEPSystem(Element pipe)
Parameters
pipeElementpipe
Returns
- Element
Returns the system of this MEP curve
Examples

Remarks
If the curve does not belong to any systems, the value will be null. If the curve belongs to more than one system, the first available value is returned.
SetDiameter(Element?, double)
Set diameter of pipe
public static Element? SetDiameter(Element? pipe, double diameter)
Parameters
pipeElementpipe need to set
diameterdoublediameter to set
Returns
- Element
pipe
Examples

Exceptions
SetSystemType(Element, int)
Updates the associated system type for the pipe.
public static Element SetSystemType(Element pipe, int systemTypeId)
Parameters
pipeElementpipe to set system type
systemTypeIdintThe ElementId of the piping system type.
Returns
- Element
Examples

Remarks
If the pipe previously did not have a system associated to it, this will create a new system.
Exceptions
- ArgumentException
The systemTypeId is not valid piping system type.
- ArgumentNullException
A non-optional argument was null
- DisabledDisciplineException
None of the following disciplines is enabled: Mechanical Electrical Piping.
Shape(Element)
return The shape of the profile.
[NodeCategory("Query")]
public static dynamic? Shape(Element pipe)
Parameters
pipeElementpipe to get shape
Returns
- dynamic
connectorProfileType
Examples

Split(Element, Point)
split a pipe at a point
[Obsolete("This node is deprecated, please use the new node named 'MepCurve.BreakCurve' instead.")]
public static Element? Split(Element pipe, Point point)
Parameters
pipeElementpipe will be break
pointPointpoint on pipe to break
Returns
- Element
new pipe has split
Examples

SystemType(Element)
return system type of pipe
[NodeCategory("Query")]
public static Element? SystemType(Element pipe)
Parameters
pipeElementpipe to get
Returns
- Element
system type of pipe
Examples
