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: 2015.0.0.0 (2015.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.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