Hi all,
I have been using this simple C# code to copy featureclasses between geodatabases (ArcObjects SDK 10.0):
...
using ESRI.ArcGIS.DataManagementTools;
using ESRI.ArcGIS.Geoprocessor;
...
CopyFeatures cf = new CopyFeatures;
cf.in_features = "C:\\geodb1.mdb\\MyFeatureClass";
cf.out_feature_class = "C:\\geodb2.gdb\\MyFeatureClass";
Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
gp.AddOutputsToMap = false;
gp.Execute(cf,null);
...
After installing ArcObjects 10.3, "Geoprocessor.Execute()" is using other parameters, but somehow I cannot find any code examples or documentation dealing with this situation.
Any suggestions ?
-Ola
Solved! Go to Solution.
The signature for this class hasn't changed between the 10.x versions. I'd assume that the intellisense in Visual Studio is showing you the unmanaged signature for this assembly. The geoprocessor should provide you with the following signatures:
Geoprocessor.Execute(IGPProcess, ITrackCancel) // Managed
Geoprocessor.Execute(String, IVariantArray, ITrackCancel) // Unmanaged
All of the relevant information about running a managed or unmanaged tool should be available on the following page.
How to run a Geoprocessing tool
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000003rr000000
The signature for this class hasn't changed between the 10.x versions. I'd assume that the intellisense in Visual Studio is showing you the unmanaged signature for this assembly. The geoprocessor should provide you with the following signatures:
Geoprocessor.Execute(IGPProcess, ITrackCancel) // Managed
Geoprocessor.Execute(String, IVariantArray, ITrackCancel) // Unmanaged
All of the relevant information about running a managed or unmanaged tool should be available on the following page.
How to run a Geoprocessing tool
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000003rr000000
I see it now:
ESRI.ArcGIS.Geoprocessing.GeoProcessor gpUnManaged = new ESRI.ArcGIS.Geoprocessing.GeoProcessor(); gpUnManaged.Execute(name, params, trackCancel); VS | |
ESRI.ArcGIS.Geoprocessor.Geoprocessor gpManaged = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); gpManaged.Execute(tool,trackCancel); |
Details, details...
Thanks a lot!