| Revit 2020 API |
| Element..::..IsValidType Method (ElementId) |
| Element Class See Also |
Checks if given type is valid for this element.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
Since:
2011
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.DB..::..ElementId
ElementId of the type to check.
Return Value
True if element can have a type assigned and this type is valid for this element, false otherwise.
Remarks
A type is valid for an element if it can be assigned to the element.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |