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

CanApplyColorFillScheme

Method
Description:
Checks if the id can be applied as the scheme id of specified category to this view.
Remarks:

The input scheme id could be InvalidElementId to clear the scheme for the specified category.

Some examples of returnning false:

  • The id is not a color fill scheme id.
  • The specified category is not supported by this view.
  • The category of scheme is not the same as the specified category.
  • The view is area plan but the scheme category is not OST_Areas, or their [!:Autodesk::Revit::DB::AreaScheme] are not the same.
  • Etc.
Syntax
public bool CanApplyColorFillScheme(
	ElementId categoryId,
	ElementId schemeId
)
Parameters
Parameter Type Description
categoryId Autodesk.Revit.DB.ElementId The id of category.
schemeId Autodesk.Revit.DB.ElementId The id of color fill scheme.
Return Value
Type Description
Autodesk.Revit.Exceptions.ArgumentNullException True if the id can be applied as the scheme id of specified category in this view, false otherwise.
Exceptions
Exception Condition
Autodesk.Revit.Exceptions.ArgumentNullException A non-optional argument was null