PlaceInstance Method


Places an assembly instance of a given assembly type at the specified location.

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

Syntax

C#
public static AssemblyInstance PlaceInstance(
	Document document,
	ElementId assemblyTypeId,
	XYZ location
)
Visual Basic
Public Shared Function PlaceInstance ( _
	document As Document, _
	assemblyTypeId As ElementId, _
	location As XYZ _
) As AssemblyInstance
Visual C++
public:
static AssemblyInstance^ PlaceInstance(
	Document^ document, 
	ElementId^ assemblyTypeId, 
	XYZ^ location
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document for the new assembly instance.
assemblyTypeId
Type: Autodesk.Revit.DB ElementId
The id of the assembly type to be used for the instance.
location
Type: Autodesk.Revit.DB XYZ
The placement location for the instance in project coordinates.

Return Value

The newly created assembly instance.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

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 →