ArcGIS Pro 3.3 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 bool CanSetSegmentSymbolOptions( 
       SegmentSymbolOptions segmentSymbol
    )
    Public Function CanSetSegmentSymbolOptions( _
       ByVal segmentSymbol As SegmentSymbolOptions _
    ) As Boolean

    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;
    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, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also