ColorFillLegendCreate Method |
Creates new instance of ColorFillLegend.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static ColorFillLegend Create(
Document document,
ElementId viewId,
ElementId catetoryId,
XYZ origin
)
Public Shared Function Create (
document As Document,
viewId As ElementId,
catetoryId As ElementId,
origin As XYZ
) As ColorFillLegend
public:
static ColorFillLegend^ Create(
Document^ document,
ElementId^ viewId,
ElementId^ catetoryId,
XYZ^ origin
)
static member Create :
document : Document *
viewId : ElementId *
catetoryId : ElementId *
origin : XYZ -> ColorFillLegend
Parameters
- document Document
-
The document.
- viewId ElementId
-
The id of the view to place legend in.
- catetoryId ElementId
-
The id of category that color fill scheme belongs to.
- origin XYZ
-
The origin point of the legend, must be on the view plane.
Return Value
ColorFillLegend
ExceptionsException | Condition |
---|
ArgumentException |
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.
|
ArgumentNullException |
A non-optional argument was null
|
ModificationForbiddenException |
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.
|
ModificationOutsideTransactionException |
The document has no open transaction.
|
Remarks
See Also