Table of Contents

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

pipeType Element

the element type of pipe

level Element

the element level

connector1 Connector

first connector to define first pipe draw pipe

endPoint Point

end 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

pipeType Element

the element type of pipe

level Element

the element level

connector1 Connector

first connector to define first pipe draw pipe

endPoint Point

end point to draw pipe

diameter double

size 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

systemType Element

the element of pipe system type

pipeType Element

the element type of pipe

level Element

element level

line Line

line 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

systemType Element

the element of pipe system type

pipeType Element

the element type of pipe

level Element

element level

line Line

line to draw pipe

diameter double

size 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

systemType Element

The Element of the piping system type.

pipeType Element

The Element of the pipe type.

level Element

The Element level.

startPoint Point

The start point of the pipe.

direction Vector

direction of new pipe

length double
diameter double

size 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

pipeType Element

type of pipe

level Element

level

connector1 Connector

first connector

connector2 Connector

second 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

pipeType Element

type of pipe

level Element

level

connector1 Connector

first connector

connector2 Connector

second connector

diameter double

size 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

systemType Element

The Element of the piping system type.

pipeType Element

The Element of the pipe type.

level Element

The Element level.

startPoint Point

The start point of the pipe.

endPoint Point

The 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

systemType Element

The Element of the piping system type.

pipeType Element

The Element of the pipe type.

level Element

The Element level.

startPoint Point

The start point of the pipe.

endPoint Point

The end point of the pipe.

diameter double

size 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

systemType Element

system type of pipe

pipeType Element

type of pipe

level Element

level of pipe

points List<Point>

list point ordered of pipe

diameter double

value 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

pipe Element

Element 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

pipe Element

pipe

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

pipe Element

pipe

Returns

Dictionary<string, object>

Examples

GetFamilySymbolCapsByRouting(Element?)

return Caps family of pipe get in routing setting

[MultiReturn(new string[] { "FamilySymbol", "Family" })]
public static IDictionary? GetFamilySymbolCapsByRouting(Element? pipe)

Parameters

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe 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

pipe Element

pipe

Returns

double

roughness

Examples

GetTap(Element)

Return Tap Of Pipe In Routing Preferences

public static Element? GetTap(Element pipe)

Parameters

pipe Element

pipe

Returns

Element

tap

Examples

GetTee(Element)

Return Tee Of Pipe In Routing Preferences

public static Element? GetTee(Element pipe)

Parameters

pipe Element

pipe

Returns

Element

tee

Examples

GetTransition(Element)

Return Transition Of Pipe In Routing Preferences

public static Element? GetTransition(Element pipe)

Parameters

pipe Element

pipe

Returns

Element

transition

Examples

GetUnion(Element)

Return Union Of Pipe In Routing Preferences

public static Element? GetUnion(Element pipe)

Parameters

pipe Element

pipe

Returns

Element

union

Examples

MEPSystem(Element)

The system of the MEP curve.

[NodeCategory("Query")]
public static Element? MEPSystem(Element pipe)

Parameters

pipe Element

pipe

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

pipe Element

pipe need to set

diameter double

diameter to set

Returns

Element

pipe

Examples

Exceptions

Exception

SetSystemType(Element, int)

Updates the associated system type for the pipe.

public static Element SetSystemType(Element pipe, int systemTypeId)

Parameters

pipe Element

pipe to set system type

systemTypeId int

The 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

pipe Element

pipe 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

pipe Element

pipe will be break

point Point

point 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

pipe Element

pipe to get

Returns

Element

system type of pipe

Examples