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: 24.0.0.0 (24.0.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.DBDocument
The document for the new assembly instance.
assemblyTypeId
Type: Autodesk.Revit.DBElementId
The id of the assembly type to be used for the instance.
location
Type: Autodesk.Revit.DBXYZ
The placement location for the instance in project coordinates.

Return Value

The newly created assembly instance.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also