bruce.nielsen

GPUtilities Class Problem

Discussion created by bruce.nielsen on Sep 5, 2013
Latest reply on Oct 29, 2013 by bruce.nielsen
I'm trying to use a call to the GPUtilities class 3 times in 2 modules in the VB.NET addin I'm developing (ArcGIS 10.0, VS 2010). Since it is a singleton object, each time it is declared with:
Dim t As Type = Type.GetTypeFromProgID("esriGeoprocessing.GPUtilities")
Dim obj As System.Object = Activator.CreateInstance(t)
Dim pGPU As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = obj

It is working for the first 2 occurrances in the first module, but when the code gets to the third occurrance in the second module
Dim pHELLayer As IFeatureLayer = pGPU.OpenFeatureLayerFromString("F:\SD_Tools\HEL_Tool\HEL_Data.shp")
I get this message:
[ATTACH=CONFIG]27240[/ATTACH]
Any ideas on how to fix this error? Do I need to go back to using a WorkspaceFactory to access this shapefile?

Attachments

Outcomes