Create Method


Subelement Create Method

Creates an object representing element or subelement.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static Subelement Create(
	Document aDoc,
	Reference reference
)

Parameters

aDoc Document
The document.
reference Reference
The reference that identifies element or subelement.

Return Value

Subelement
The newly created subelement.
Exceptions
Exception Condition
ArgumentException reference does not identify a valid element or subelement.
ArgumentNullException A non-optional argument was null
Remarks
If %reference% points to linked document:
  • The GetReference method of the newly created subelement will return the local reference in the linked document.
  • The Document property of the newly created subelement will return the linked document.
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 →