//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;
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 });
System.Object
ArcGIS.Desktop.Core.EditingOptions
Target Platforms: Windows 11, Windows 10, Windows 8.1