SketchEditScopeStart Method |
Starts a sketch edit mode.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void Start(
ElementId sketchId
)
Public Sub Start (
sketchId As ElementId
)
public:
void Start(
ElementId^ sketchId
)
member Start :
sketchId : ElementId -> unit
Parameters
- sketchId ElementId
-
The Sketch element to be edited.
ExceptionsException | Condition |
---|
ArgumentException |
The ElementId sketchId does not represent a Sketch.
-or-
Sketch does not support editing.
-or-
Failed to start the sketch edit mode.
|
ArgumentNullException |
A non-optional argument was null
|
InvalidOperationException |
This SketchEditScope is not permitted to start at this moment for one of the following possible reasons:
The document is in read-only state, or the document is currently modifiable,
or there already is another edit mode active in the document.
|
Remarks
The application will need to start a transaction to actually make changes to the Sketch element.
SketchEditScope can only be started when there is no transaction active, thus it does not
work for commands running in automatic transaction mode.
See Also