Select to view content in your preferred language

Using Geoprocessing tools in VBA

858
8
11-09-2009 06:42 AM
JeanJuengling
New Contributor
When trying to import some 9.3.1 VBA code in 9.4, I get a run-time error '21474672559 (80004005)' on the GP.Toolbox line below:

Dim GP As Object
Set GP = CreateObject("esriGeoprocessing.GpDispatch.1")
GP.Toolbox = "C:\Program Files\ArcGIS\Desktop9.4\ArcToolbox\Toolboxes\Analysis Tools.tbx"

Is it still possible to access the geoprocessing tools this way?
0 Kudos
8 Replies
RalfGottschalk
Esri Contributor
Yes it will be possible to create the Geoprocessor this way at 9.4.  However, this does not work right now at Beta 1.  This is a known issue and the tracking number is NIM049770.
0 Kudos
curtvprice
MVP Esteemed Contributor
I'm having the same issue with beta 1 using script tools written in vbscript that access the geoprocessor through gpdispatch.

You can add me to the list!
0 Kudos
curtvprice
MVP Esteemed Contributor
I'm having the same issue with beta 1 using script tools written in vbscript that access the geoprocessor through gpdispatch.

You can add me to the list!


Still having this problem. Error popup message follows:

Could not create object named "esriGeoprocessing.GPDispatch.1".

ArcMap 10.0 PR 1 (Build 2348)
0 Kudos
jessieleo
New Contributor
Yes it will be possible to create the Geoprocessor this way at 9.4.  However, this does not work right now at Beta 1.  This is a known issue and the tracking number is NIM049770.


I was told that ARCGIS 9.4(10) doesnot support VBA anymore. is it right?

Jessie
0 Kudos
curtvprice
MVP Esteemed Contributor
Jesse, VBA is supported, but requires a special install.

In truth, I'm trying to use VBScript, not VBA. Can someone help?
0 Kudos
JohnHauck
Occasional Contributor II
I've also tested this issue at the current build 2396 and it's still a problem. It was fixed for build 2217 but is now a problem again. I will provide some additional information as soon as possible.
0 Kudos
JohnHauck
Occasional Contributor II
After further investigation I found out that this is a known issue (NIM057021) that the problem came up again and should be resolved for the final build.
0 Kudos
curtvprice
MVP Esteemed Contributor
Jim, i would be happy to test a patch if that will help. This is needed functionality!
0 Kudos