CreatePlaceholder Method


Creates a new placeholder duct.

Namespace: Autodesk.Revit.DB.Mechanical
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2014

Syntax

C#
public static Duct CreatePlaceholder(
	Document document,
	ElementId systemTypeId,
	ElementId ductTypeId,
	ElementId levelId,
	XYZ startPoint,
	XYZ endPoint
)
Visual Basic
Public Shared Function CreatePlaceholder ( _
	document As Document, _
	systemTypeId As ElementId, _
	ductTypeId As ElementId, _
	levelId As ElementId, _
	startPoint As XYZ, _
	endPoint As XYZ _
) As Duct
Visual C++
public:
static Duct^ CreatePlaceholder(
	Document^ document, 
	ElementId^ systemTypeId, 
	ElementId^ ductTypeId, 
	ElementId^ levelId, 
	XYZ^ startPoint, 
	XYZ^ endPoint
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
systemTypeId
Type: Autodesk.Revit.DBElementId
The id of the HVAC system type.
ductTypeId
Type: Autodesk.Revit.DBElementId
The id of the duct type.
levelId
Type: Autodesk.Revit.DBElementId
The level id for the duct.
startPoint
Type: Autodesk.Revit.DBXYZ
The first point of the placeholder line.
endPoint
Type: Autodesk.Revit.DBXYZ
The second point of the placeholder line.

Return Value

The created placeholder duct.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The systemTypeId is not valid HVAC system type. -or- The duct type ductTypeId is not valid duct type. -or- The ElementId levelId is not a Level. -or- The points of startPoint and endPoint are too close: for MEPCurve, the minimum length is 1/10 inch.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsDisabledDisciplineException None of the following disciplines is enabled: Mechanical Electrical Piping.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →