| Revit 2017 API |
| GlobalParameter..::..IsValidDataType Method |
| GlobalParameter Class See Also |
Tests whether the input Data Type is valid as a type of a global parameter.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since:
2016 Subscription Update
Syntax
| C# |
|---|
public static bool IsValidDataType( ParameterType datatype ) |
| Visual Basic |
|---|
Public Shared Function IsValidDataType ( _ datatype As ParameterType _ ) As Boolean |
| Visual C++ |
|---|
public: static bool IsValidDataType( ParameterType datatype ) |
Parameters
- datatype
- Type: Autodesk.Revit.DB..::..ParameterType
Type of the data the parameter is to store.
Return Value
True if the data type is suitable for a global parameter; False otherwise.
Remarks
Since most data types but not all are supported by global parameters,
it is reasonable to test a ParameterType before attempting to create
a global parameter of it.
Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |