Create a MultiSegmentGrid element from the specified curve loop.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2013
Syntax
C# |
---|
public static ElementId Create( Document document, ElementId typeId, CurveLoop curveLoop, ElementId sketchPlaneId ) |
Visual Basic |
---|
Public Shared Function Create ( _ document As Document, _ typeId As ElementId, _ curveLoop As CurveLoop, _ sketchPlaneId As ElementId _ ) As ElementId |
Visual C++ |
---|
public: static ElementId^ Create( Document^ document, ElementId^ typeId, CurveLoop^ curveLoop, ElementId^ sketchPlaneId ) |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document in which to create the MultiSegmentGrid.
- typeId
- Type: Autodesk.Revit.DB..::..ElementId
Element id of a GridType element.
- curveLoop
- Type: Autodesk.Revit.DB..::..CurveLoop
An open curve loop consisting of lines and arcs.
- sketchPlaneId
- Type: Autodesk.Revit.DB..::..ElementId
Element id of a SketchPlane for the curves elements that will be created from the curveLoop.
Return Value
The element id of the new MultiSegmentGrid element.
Remarks
For each curve in the curve loop, a corresponding Grid will be created.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | The element id should refer to a valid horizontal SketchPlane. -or- The element id should refer to a GridType element. -or- The curve loop should be an open loop consisting of lines and arcs. |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |
Autodesk.Revit.Exceptions..::..InvalidOperationException | 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). |
Autodesk.Revit.Exceptions..::..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. |
Autodesk.Revit.Exceptions..::..ModificationOutsideTransactionException | The document has no open transaction. |