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
Elementthe element type of pipe
level
Elementthe element level
connector1
Connectorfirst connector to define first pipe draw pipe
endPoint
Pointend 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
Elementthe element type of pipe
level
Elementthe element level
connector1
Connectorfirst connector to define first pipe draw pipe
endPoint
Pointend point to draw pipe
diameter
doublesize 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
Elementthe element of pipe system type
pipeType
Elementthe element type of pipe
level
Elementelement level
line
Lineline 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
Elementthe element of pipe system type
pipeType
Elementthe element type of pipe
level
Elementelement level
line
Lineline to draw pipe
diameter
doublesize 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
ElementThe Element of the piping system type.
pipeType
ElementThe Element of the pipe type.
level
ElementThe Element level.
startPoint
PointThe start point of the pipe.
direction
Vectordirection of new pipe
length
doublediameter
doublesize 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
Elementtype of pipe
level
Elementlevel
connector1
Connectorfirst connector
connector2
Connectorsecond 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
Elementtype of pipe
level
Elementlevel
connector1
Connectorfirst connector
connector2
Connectorsecond connector
diameter
doublesize 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
ElementThe Element of the piping system type.
pipeType
ElementThe Element of the pipe type.
level
ElementThe Element level.
startPoint
PointThe start point of the pipe.
endPoint
PointThe 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
ElementThe Element of the piping system type.
pipeType
ElementThe Element of the pipe type.
level
ElementThe Element level.
startPoint
PointThe start point of the pipe.
endPoint
PointThe end point of the pipe.
diameter
doublesize 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
Elementsystem type of pipe
pipeType
Elementtype of pipe
level
Elementlevel of pipe
points
List<Point>list point ordered of pipe
diameter
doublevalue 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
ElementElement 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
Elementpipe
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
Elementpipe
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
pipe
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe 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
Elementpipe
Returns
- double
roughness
Examples
GetTap(Element)
Return Tap Of Pipe In Routing Preferences
public static Element? GetTap(Element pipe)
Parameters
pipe
Elementpipe
Returns
- Element
tap
Examples
GetTee(Element)
Return Tee Of Pipe In Routing Preferences
public static Element? GetTee(Element pipe)
Parameters
pipe
Elementpipe
Returns
- Element
tee
Examples
GetTransition(Element)
Return Transition Of Pipe In Routing Preferences
public static Element? GetTransition(Element pipe)
Parameters
pipe
Elementpipe
Returns
- Element
transition
Examples
GetUnion(Element)
Return Union Of Pipe In Routing Preferences
public static Element? GetUnion(Element pipe)
Parameters
pipe
Elementpipe
Returns
- Element
union
Examples
MEPSystem(Element)
The system of the MEP curve.
[NodeCategory("Query")]
public static Element? MEPSystem(Element pipe)
Parameters
pipe
Elementpipe
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
Elementpipe need to set
diameter
doublediameter 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
pipe
Elementpipe to set system type
systemTypeId
intThe 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
Elementpipe 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
Elementpipe will be break
point
Pointpoint 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
Elementpipe to get
Returns
- Element
system type of pipe