Create Method (Document, ElementId)


Creates a new instance of a mechanical system and adds it to the document.

Namespace: Autodesk.Revit.DB.Mechanical
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2011

Syntax

C#
public static MechanicalSystem Create(
	Document ADocument,
	ElementId typeId
)
Visual Basic
Public Shared Function Create ( _
	ADocument As Document, _
	typeId As ElementId _
) As MechanicalSystem
Visual C++
public:
static MechanicalSystem^ Create(
	Document^ ADocument, 
	ElementId^ typeId
)

Parameters

ADocument
Type: Autodesk.Revit.DB Document
The document where the element will be created and added.
typeId
Type: Autodesk.Revit.DB ElementId
The identifier of this mechanical system element's type.

Return Value

The newly created mechanical system element.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The typeId is not an element id for a valid mechanical system type.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions DisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.

See Also