UnitUtils.IsValidDisplayUnit
Description:
Checks whether a display unit is valid.
Checks whether a display unit is valid.
Remarks:
A display unit is considered valid if it is an actual unit like meters or feet. Obsolete values and the special values DUT_CUSTOM and DUT_UNDEFINED are not considered valid.
A display unit is considered valid if it is an actual unit like meters or feet. Obsolete values and the special values DUT_CUSTOM and DUT_UNDEFINED are not considered valid.
Overloads (2):
IsValidDisplayUnit(DisplayUnitType)
[ObsoleteAttribute("This method is deprecated in Revit 2021 and may be removed in a future version of Revit. Please use the `IsUnit(ForgeTypeId)` method instead.")]
public static bool IsValidDisplayUnit(
DisplayUnitType displayUnitEnum
)
-
displayUnitEnumThe display unit to check.
Return Value
bool
True if the display unit is valid, false otherwise.
-
A value passed for an enumeration argument is not a member of that enumeration