FormatOptions.IsValidForUnitType
Description:
Checks whether this FormatOptions is valid for a given unit type.
Checks whether this FormatOptions is valid for a given unit type.
Remarks:
The FormatOptions is valid if UseDefault is true or if the display unit in the FormatOptions is valid for the unit type. See UnitUtils.IsValidDisplayUnit(UnitType, DisplayUnitType) and UnitUtils.GetValidDisplayUnits(UnitType).
The FormatOptions is valid if UseDefault is true or if the display unit in the FormatOptions is valid for the unit type. See UnitUtils.IsValidDisplayUnit(UnitType, DisplayUnitType) and UnitUtils.GetValidDisplayUnits(UnitType).
[ObsoleteAttribute("This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `IsValidForSpec(ForgeTypeId)` method instead.")]
public bool IsValidForUnitType(
UnitType unitType
)
-
unitTypeThe unit type.
Return Value
bool
True if the FormatOptions is valid, false otherwise.
-
unitType is an invalid unit type. See UnitUtils.IsValidUnitType() and UnitUtils.GetValidUnitTypes().
-
A value passed for an enumeration argument is not a member of that enumeration