ColorFillLegend.Create
Description:
Creates new instance of ColorFillLegend.
Creates new instance of ColorFillLegend.
Remarks:
Use SupportedColorFillCategoryIds() to get list of supported categories.
Use SupportedColorFillCategoryIds() to get list of supported categories.
public static ColorFillLegend Create(
Document document,
ElementId viewId,
ElementId catetoryId,
XYZ origin
)
-
documentThe document.
-
viewIdThe id of the view to place legend in.
-
catetoryIdThe id of category that color fill scheme belongs to.
-
originThe origin point of the legend, must be on the view plane.
-
document is not a project document. -or- There's no valid color fill scheme applied for catetoryId in viewId. -or- The origin is not on the view plane.
-
A non-optional argument was null
-
The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
-
The document has no open transaction.