Type t = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory.1");//("{DD48C96A-D92A-11D1-AA81-00C04FA33A15}"); System.Object obj = Activator.CreateInstance(t);
What is the GUI for the Geoprocessor object not GeoProcessor?
Please elaborate.
Hi Kirk-
2 questions: What is the GUI for the Geoprocessor object not GeoProcessor? I was using Geoprocessor object because its execute method only takes 2 arguments.
If I have to use GeoProcessor then the first parameter required is string Name. What is Name? The Name of the tool? FeatureClassToFeatureClass_Conversion?
Are you creating it repeatedly in a loop?
Did you try calling Marshal.ReleaseCOMobject on it once you're finished with it?
I'm having the exact same issue with my windows console EXE in C# for 10.2.1.3497 - even the part where it works sometimes but not every time! Some times it works just fine. Others it fails with that same error:
Creating an instance of the COM component with CLSID {5374EC4C-1AA2-4829-A811-DE624ECEC23F} from the IClassFactory failed due to the following error: 80010105.System.Runtime.InteropServices.COMException (0x80010105): Creating an instance of the COM component with CLSID {5374EC4C-1AA2-4829-A811-DE624ECEC23F} from the IClassFactory failed due to the following error: 80010105.
at ESRI.ArcGIS.Geoprocessor.Geoprocessor..ctor()
I'm checking out an Advanced license at the beginning so that part is working fine.
I'm referencing the following .net assemblies:
ESRI.ArcGIS.Geoprocessing
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet\ESRI.ArcGIS.Geoprocessing.dll
runtime v2.0.50727
version 10.2.0.0
ESRI.ArcGIS.Geoprocessor
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet\ESRI.ArcGIS.Geoprocessor.dll
runtime v2.0.50727
version 10.2.0.0
Here's my code (it fails right on that first line when executing that Geoprocessor() constructor):
Geoprocessor GP = new Geoprocessor();
IGeoProcessorResult processorResult = null;
var createFileGDBTool = new CreateFileGDB(exportFolder, fileGdbName);
processorResult = (IGeoProcessorResult)GP.Execute(createFileGDBTool, null);
var gpTool = new FeatureClassToFeatureClass(inputtable, fullExportPath, fileGdbTableName) { };
processorResult = (IGeoProcessorResult)GP.Execute(gpTool, null);
Why in the world would it work sometimes and not every time?