Document New |
Creates a new MEP mechanical system element.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)

public MechanicalSystem NewMechanicalSystem(
Connector baseEquipmentConnector,
ConnectorSet connectors,
DuctSystemType ductSystemType
)
Parameters
- baseEquipmentConnector Connector
- One connector within base equipment which is used to connect with the system. The base equipment is optional for the system, so this argument may be . The baseEquipmentConnector should not be included in the connectors.
- connectors ConnectorSet
- Connectors that will connect to the system. The owner elements of these connectors will be added into system as its elements.
- ductSystemType DuctSystemType
- The system type.
Return Value
MechanicalSystemIf creation was successful then an instance of mechanical system is returned, otherwise an exception with information will be thrown.

Exception | Condition |
---|---|
InvalidOperationException | Thrown when calling this function outside of the Autodesk Revit MEP product. |
ArgumentNullException | Thrown when the input connectors parameter value is . |
ArgumentOutOfRangeException | Thrown when the ductSystemType parameter is out of permitted scope. |
ArgumentException | Thrown when some connectors can't be used to create the mechanical system. All the input connectors and base equipment connector should match system type and domain with the system, and they should not have been used in another system. The owner of BaseConnector should be a mechanical equipment, and the owner of other connectors should be a mechanical equipment or air terminal. |
InvalidOperationException | Thrown when the mechanical system creation failed. |

This method will regenerate the document even in manual regeneration mode.
