M

Pipe.Create

Description:
Creates a new pipe that connects to two connectors.
Remarks:
The new pipe will have the same diameter and system type as the start connector. The creation will also connect the new pipe to two component who owns the specified connectors. If necessary, additional fitting(s) are included to make a valid connection. If the new pipe can not be connected to the next component (e.g., mismatched direction, no valid fitting, and etc), the new pipe will still be created at the specified connector position, and an InvalidOperationException is thrown.
Overloads (3):
Create(Document,ElementId,ElementId,Connector,Connector)
public static Pipe Create(
	Document document,
	ElementId pipeTypeId,
	ElementId levelId,
	Connector startConnector,
	Connector endConnector
)
  • document
    The document.
  • pipeTypeId
    The ElementId of the new pipe type.
  • levelId
    The level ElementId for the new pipe.
  • startConnector
    The first connector where the new pipe starts.
  • endConnector
    The second point of the new pipe.
Return Value Pipe The pipe.
  • The pipe type pipeTypeId is not valid pipe type. -or- The ElementId levelId is not a Level. -or- The connector domain is not Domain.Piping. -or- The points of startConnector and endConnector are too close: for MEPCurve, the minimum length is 1/10 inch.
  • A non-optional argument was null
  • Thrown when the new pipe fails to connect with the connector.