Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

GPUtilities Class Problem

$
0
0
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:
Code:

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
Code:

Dim pHELLayer As IFeatureLayer = pGPU.OpenFeatureLayerFromString("F:\SD_Tools\HEL_Tool\HEL_Data.shp")
I get this message:
Attachment 27240
Any ideas on how to fix this error? Do I need to go back to using a WorkspaceFactory to access this shapefile?
Attached Thumbnails
Click image for larger version

Name:	gputilities.png‎
Views:	N/A
Size:	20.8 KB
ID:	27240  

Viewing all articles
Browse latest Browse all 1374

Trending Articles