ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapTool Class / SetSketchVertexSymbolOptions Method
The type of vertex symbol to obtain.
The new vertex symbol.
Example

In This Topic
    SetSketchVertexSymbolOptions Method
    In This Topic
    Sets the symbol for a vertex while sketching. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    protected void SetSketchVertexSymbolOptions( 
       VertexSymbolType symbolType,
       VertexSymbolOptions vertexSymbol
    )
    Protected Sub SetSketchVertexSymbolOptions( _
       ByVal symbolType As VertexSymbolType, _
       ByVal vertexSymbol As VertexSymbolOptions _
    ) 

    Parameters

    symbolType
    The type of vertex symbol to obtain.
    vertexSymbol
    The new vertex symbol.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Symbol options are not valid. See ArcGIS.Desktop.Core.EditingOptions.CanSetVertexSymbolOptions for details on option settings.
    Remarks
    This method calls the ArcGIS.Desktop.Core.EditingOptions.CanSetVertexSymbolOptions function prior to setting the symbol values. If the options are invalid, no updates are made to the symbol.
    Example
    Customizing the Sketch Symbol of a Custom Sketch Tool
    //Custom tools have the ability to change the symbology used when sketching a new feature. 
    //Both the Sketch Segment Symbol and the Vertex Symbol can be modified using the correct set method. 
    //This is set in the activate method for the tool.
    protected override Task OnToolActivateAsync(bool active)
    {
      QueuedTask.Run(() =>
      {
        //Getting the current symbology options of the segment
        var segmentOptions = GetSketchSegmentSymbolOptions();
        //Modifying the primary and secondary color and the width of the segment symbology options
        var deepPurple = new CIMRGBColor() { R = 75, G = 0, B = 110 };
        segmentOptions.PrimaryColor = deepPurple;
        segmentOptions.Width = 4;
        segmentOptions.HasSecondaryColor = true;
        var pink = new CIMRGBColor() { R = 219, G = 48, B = 130 };
        segmentOptions.SecondaryColor = pink;
        //Creating a new vertex symbol options instance with the values you want
        var vertexOptions = new VertexSymbolOptions(VertexSymbolType.RegularUnselected);
        var yellow = new CIMRGBColor() { R = 255, G = 215, B = 0 };
        var purple = new CIMRGBColor() { R = 148, G = 0, B = 211 };
        vertexOptions.AngleRotation = 45;
        vertexOptions.Color = yellow;
        vertexOptions.MarkerType = VertexMarkerType.Star;
        vertexOptions.OutlineColor = purple;
        vertexOptions.OutlineWidth = 3;
        vertexOptions.Size = 5;
    
        //Setting the value of the segment symbol options
        SetSketchSegmentSymbolOptions(segmentOptions);
        //Setting the value of the vertex symbol options of the regular unselected vertices using the vertexOptions instance created above.
        SetSketchVertexSymbolOptions(VertexSymbolType.RegularUnselected, vertexOptions);
      });
    
      return base.OnToolActivateAsync(active);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also