RVTDocs.com
Namespace: Autodesk.Revit.DB Class: FormatOptions

FormatOptions.IsValidForSpec

Method
Description:
Checks whether this FormatOptions is valid for a given spec.
Remarks:
The FormatOptions is valid if UseDefault is true or if the unit in the FormatOptions is valid for the spec. See UnitUtils.IsValidUnit(ForgeTypeId, ForgeTypeId) and UnitUtils.GetValidUnits(ForgeTypeId).
Syntax
public bool IsValidForSpec(
	ForgeTypeId specTypeId
)
Parameters
Parameter Type Description
specTypeId ForgeTypeId Identifier of the spec.
Return Value
Type Description
Boolean True if the FormatOptions is valid, false otherwise.
Exceptions
Exception Condition
ArgumentException specTypeId is not a measurable spec identifier. See UnitUtils.IsMeasurableSpec(ForgeTypeId).
ArgumentNullException A non-optional argument was null