23 lines
765 B
C#
23 lines
765 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using ArcGIS.Desktop.Core.Geoprocessing;
|
|
using ArcGIS.Desktop.Framework.Dialogs;
|
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
|
|
namespace LinkToolAddin.server;
|
|
|
|
public class CallArcGISPro
|
|
{
|
|
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(CallArcGISPro));
|
|
public async static Task<JsonRpcResultEntity> CallArcGISProTool(string toolName, List<string> toolParams)
|
|
{
|
|
var results = await Geoprocessing.ExecuteToolAsync(toolName, toolParams);
|
|
log.Info($"CallArcGISProTool: {toolName} | {toolParams}");
|
|
return new JsonRpcSuccessEntity()
|
|
{
|
|
Id = 1,
|
|
Result = results.ToString()
|
|
};
|
|
}
|
|
} |