ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core.Geoprocessing Namespace / IGPResult Interface / ReturnValue Property
Example

In This Topic
    ReturnValue Property
    In This Topic
    Returns execution result value as a string or null if tool execution fails.
    Syntax
    string ReturnValue {get;}
    ReadOnly Property ReturnValue As String
    Example
    Multi Ring Buffer
    //The data referenced in this snippet can be downloaded from the arcgis-pro-sdk-community-samples repo
    //https://github.com/Esri/arcgis-pro-sdk-community-samples
    async Task<IGPResult> CreateRings(EditingTemplate currentTemplate)
    {
      var paramsArray = Geoprocessing.MakeValueArray(currentTemplate.MapMember.Name,
                  @"C:\Data\FeatureTest\FeatureTest.gdb\Points_MultipleRingBuffer",
                  new List<string> { "1000", "2000" }, "Meters", "Distance",
                  "ALL", "FULL");
    
      IGPResult ringsResult = await Geoprocessing.ExecuteToolAsync("Analysis.MultipleRingBuffer", paramsArray);
      var messages = string.IsNullOrEmpty(gpResult.ReturnValue)
              ? $@"Error in gp tool: {gpResult.ErrorMessages}"
              : $@"Ok: {gpResult.ReturnValue}";
    
      return ringsResult;
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also