Creates new instance of ColorFillLegend.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2022
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- viewId
- Type: Autodesk.Revit.DBElementId
The id of the view to place legend in.
- catetoryId
- Type: Autodesk.Revit.DBElementId
The id of category that color fill scheme belongs to.
- origin
- Type: Autodesk.Revit.DBXYZ
The origin point of the legend, must be on the view plane.
Remarks
Use SupportedColorFillCategoryIds to get list of supported categories.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | 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. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsModificationForbiddenException | 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. |
Autodesk.Revit.ExceptionsModificationOutsideTransactionException | The document has no open transaction. |