IsValidSubelementReference Method


Subelement Is Valid Subelement Reference Method

Checks if given Reference identifies either a valid element or subelement.

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

Parameters

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

Return Value

Boolean
True if %reference% identifies a valid element or subelement, false otherwise.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
A reference to an element or subelement in a linked document is acceptable.
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 →