ClearValue Method


Clears the parameter to its initial value.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.0.0.377)
Since: 2020

Syntax

C#
public bool ClearValue()
Visual Basic
Public Function ClearValue As Boolean
Visual C++
public:
bool ClearValue()

Return Value

The ClearValue method will return True if the parameter was successfully cleared to its initial value, otherwise false.

Remarks

This method will only succeed for Shared parameters that have their HideWhenNoValue property set to true.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions InvalidOperationException The parameter is read-only, or the parameter is not a shared parameter, or the shared parameter has HideWhenNoValue set to false.

See Also