Revit 2023 API |
Entity..::..Clear Method (String) |
Entity Class See Also |
Resets the field to its default value.
Namespace: Autodesk.Revit.DB.ExtensibleStorage
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since:
2012
Syntax
C# |
---|
public void Clear( string fieldName ) |
Visual Basic |
---|
Public Sub Clear ( _ fieldName As String _ ) |
Visual C++ |
---|
public: void Clear( String^ fieldName ) |
Parameters
- fieldName
- Type: System..::..String
The name of the field to clear.
Remarks
The default value is zero for numeric fields, invalid value for identifiers and
entities, and empty for strings and containers.
This method is a shortcut that will look up the field by name. If you want to call it
on many entities, it is faster if you look up the field yourself.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The name matches no field in this Entity's Schema. -or- This field's subschema prevents writing. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions..::..InvalidOperationException | This Entity is invalid. |