UnitUtils.IsValidDisplayUnit
Description:
Checks whether a display unit is valid for a given unit type.
Checks whether a display unit is valid for a given unit type.
Overloads (2):
IsValidDisplayUnit(UnitType,DisplayUnitType)
[ObsoleteAttribute("This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `IsValidUnit(ForgeTypeId, ForgeTypeId)` method instead.")]
public static bool IsValidDisplayUnit(
UnitType unitType,
DisplayUnitType displayUnit
)
-
unitTypeThe unit type.
-
displayUnitThe display unit to check.
Return Value
bool
True if the display unit 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