IVariantArray的注意事项:AE 调用GP工具方法介绍及常见错误“对 COM 组件的调用返回了错误 HRESULTE_FAIL

AE 调用GP工具方法介绍及常见错误“对 COM 组件的调用返回了错误 HRESULTE_FAIL

调用GP工具的方式有其中一种就是直接调用.tbx:例如:

string toolPath =@"C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Toolboxes\Analysis Tools.tbx";
是使用Geoprocessing类,工具参数使用IVariantArray方式输入;

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.AnalysisTools;
using ESRI.ArcGIS.DataManagementTools;
using ESRI.ArcGIS.Geoprocessing;

 IGeoProcessorResult result = new GeoProcessorResultClass();
            IGeoProcessor gp = new GeoProcessorClass();


            string toolPath = @"C:\Program Files (x8

你可能感兴趣的:(ArcEngine,arcgis)