ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / EditingOptions Class / CanSetSegmentSymbolOptions Method
The segment symbol
Example

In This Topic
    CanSetSegmentSymbolOptions Method
    In This Topic
    Determines if the segment sketch symbol can be set.
    Syntax
    Public Function CanSetSegmentSymbolOptions( _
       ByVal segmentSymbol As SegmentSymbolOptions _
    ) As Boolean
    public bool CanSetSegmentSymbolOptions( 
       SegmentSymbolOptions segmentSymbol
    )

    Parameters

    segmentSymbol
    The segment symbol

    Return Value

    True if the segment symbol options are valid. False otherwise.
    Remarks
    This function should be called prior to SetSegmentSymbolOptions to ensure the parameters are valid. It checks the following
    • Width is a positive number (ie greater than 0)
    Example
    Set Sketch Segment Symbol Options
    {
      var options = ApplicationOptions.EditingOptions;
      //var options = ApplicationOptions.EditingOptions;
      await QueuedTask.Run(() =>
      {
        //change the segment symbol primary color to green and
        //width to 1 pt
        var segSymbol = options.GetSegmentSymbolOptions();
        segSymbol.PrimaryColor = ColorFactory.Instance.GreenRGB;
        segSymbol.Width = 1;
    
        //Are these valid?
        if (options.CanSetSegmentSymbolOptions(segSymbol))
        {
          //apply them
          options.SetSegmentSymbolOptions(segSymbol);
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also