IsValidType Method


Checks if given type is valid for this subelement.

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

Syntax

C#
public bool IsValidType(
	ElementId typeId
)
Visual Basic
Public Function IsValidType ( _
	typeId As ElementId _
) As Boolean
Visual C++
public:
bool IsValidType(
	ElementId^ typeId
)

Parameters

typeId
Type: Autodesk.Revit.DBElementId
ElementId of the type to check.

Return Value

True if subelement can have a type assigned and this type is valid for this subelement, false otherwise.

Remarks

A type is valid for a subelement if it can be assigned to the subelement.

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 →