ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Core Namespace / EditingOptions Class
Members Example

In This Topic
    EditingOptions Class
    In This Topic
    Gets and sets the application editing options.
    Object Model
    EditingOptions ClassSegmentSymbolOptions ClassVertexSymbolOptions ClassSegmentSymbolOptions ClassVertexSymbolOptions Class
    Syntax
    public class EditingOptions 
    Public Class EditingOptions 
    Example
    Get/Set Editing Options
    //toggle, switch option values
    var options = ApplicationOptions.EditingOptions;
    
    options.EnforceAttributeValidation = !options.EnforceAttributeValidation;
    options.WarnOnSubtypeChange = !options.WarnOnSubtypeChange;
    options.InitializeDefaultValuesOnSubtypeChange = !options.InitializeDefaultValuesOnSubtypeChange;
    options.UncommitedAttributeEdits = (options.UncommitedAttributeEdits == 
      UncommitedEditMode.AlwaysPrompt) ? UncommitedEditMode.Apply : UncommitedEditMode.AlwaysPrompt;
    
    options.StretchGeometry = !options.StretchGeometry;
    options.StretchTopology = !options.StretchTopology;
    options.UncommitedGeometryEdits = (options.UncommitedGeometryEdits == 
      UncommitedEditMode.AlwaysPrompt) ? UncommitedEditMode.Apply : UncommitedEditMode.AlwaysPrompt;
    
    options.ActivateMoveAfterPaste = !options.ActivateMoveAfterPaste;
    options.ShowFeatureSketchSymbology = !options.ShowFeatureSketchSymbology;
    options.FinishSketchOnDoubleClick = !options.FinishSketchOnDoubleClick;
    options.AllowVertexEditingWhileSketching = !options.AllowVertexEditingWhileSketching;
    options.ShowDeleteDialog = !options.ShowDeleteDialog;
    options.EnableStereoEscape = !options.EnableStereoEscape;
    options.DragSketch = !options.DragSketch;
    options.ShowDynamicConstraints = !options.ShowDynamicConstraints;
    options.IsDeflectionDefaultDirectionConstraint = 
      !options.IsDeflectionDefaultDirectionConstraint;
    options.IsDirectionDefaultInputConstraint = !options.IsDirectionDefaultInputConstraint;
    options.ShowEditingToolbar = !options.ShowEditingToolbar;
    options.ToolbarPosition = (options.ToolbarPosition == ToolbarPosition.Bottom) ? 
              ToolbarPosition.Right : ToolbarPosition.Bottom;
    options.ToolbarSize = (options.ToolbarSize == ToolbarSize.Medium) ? 
              ToolbarSize.Small : ToolbarSize.Medium;
    options.MagnifyToolbar = !options.MagnifyToolbar;
    
    options.EnableEditingFromEditTab = !options.EnableEditingFromEditTab;
    options.AutomaticallySaveEdits = !options.AutomaticallySaveEdits;
    options.AutoSaveByTime = !options.AutoSaveByTime;
    options.SaveEditsInterval = (options.AutomaticallySaveEdits) ? 20 : 10;
    options.SaveEditsOperations = (options.AutomaticallySaveEdits) ? 60 : 30;
    options.SaveEditsOnProjectSave = !options.SaveEditsOnProjectSave;
    options.ShowSaveEditsDialog = !options.ShowSaveEditsDialog;
    options.ShowDiscardEditsDialog = !options.ShowDiscardEditsDialog;
    options.DeactivateToolOnSaveOrDiscard = !options.DeactivateToolOnSaveOrDiscard;
    options.NewLayersEditable = !options.NewLayersEditable;
    
    Get/Set Editing Annotation Options
    var eOptions = ApplicationOptions.EditingOptions;
    
    var followLinkedLines = eOptions.AutomaticallyFollowLinkedLineFeatures;
    var followLinedPolygons = eOptions.AutomaticallyFollowLinkedPolygonFeatures;
    var usePlacementProps = eOptions.UseAnnotationPlacementProperties;
    var followMode = eOptions.AnnotationFollowMode;
    var placementMode = eOptions.AnnotationPlacementMode;
    
         
    eOptions.AnnotationFollowMode = AnnotationFollowMode.Parallel;
    eOptions.AnnotationPlacementMode = AnnotationPlacementMode.Left;
    Get Sketch Vertex Symbology Options
    var options = ApplicationOptions.EditingOptions;
    
    //Must use QueuedTask
    QueuedTask.Run(() =>
    {
      //There are 4 vertex symbol settings - selected, unselected and the
      //current vertex selected and unselected.
      var reg_select = options.GetVertexSymbolOptions(VertexSymbolType.RegularSelected);
      var reg_unsel = options.GetVertexSymbolOptions(VertexSymbolType.RegularUnselected);
      var curr_sel = options.GetVertexSymbolOptions(VertexSymbolType.CurrentSelected);
      var curr_unsel = options.GetVertexSymbolOptions(VertexSymbolType.CurrentUnselected);
    
      //to convert the options to a symbol use
      //GetPointSymbol
      var reg_sel_pt_symbol = reg_select.GetPointSymbol();
      //ditto for reg_unsel, curr_sel, curr_unsel
    });
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Core.EditingOptions

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also