IsValidSubelementReference Method


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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018

Syntax

C#
public static bool IsValidSubelementReference(
	Document aDoc,
	Reference reference
)
Visual Basic
Public Shared Function IsValidSubelementReference ( _
	aDoc As Document, _
	reference As Reference _
) As Boolean
Visual C++
public:
static bool IsValidSubelementReference(
	Document^ aDoc, 
	Reference^ reference
)

Parameters

aDoc
Type: Autodesk.Revit.DBDocument
The document.
reference
Type: Autodesk.Revit.DBReference
The reference that identifies an element or subelement.

Return Value

True if %reference% identifies a valid element or subelement, false otherwise.

Remarks

A reference to an element or subelement in a linked document is acceptable.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException 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 →