Start Method


Starts a sketch edit mode.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2022

Syntax

C#
public void Start(
	ElementId sketchId
)
Visual Basic
Public Sub Start ( _
	sketchId As ElementId _
)
Visual C++
public:
void Start(
	ElementId^ sketchId
)

Parameters

sketchId
Type: Autodesk.Revit.DB ElementId
The Sketch element to be edited.

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. Like all Start methods in any edit scope object this too returns an Id of the element in the edit session, even though in this case here it always equals to the given sketchId.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The ElementId sketchId does not represent a Sketch. -or- Sketch does not support editing.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions 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.

See Also