Select to view content in your preferred language

Connecting VBA to web mapping application

1169
5
03-15-2011 02:15 PM
JoannaLaroussi
Emerging Contributor
I have some legacy script in VBA, which is running in ArcMap document. It starts after pressing a button in a blank map document and saves results in a gdb. I am scripting in C# and I am not very familiar with VB, so I rather do not change much there. I am building now a web mapping application on ArcGIS Server Workgroup and I need to connect this VBA script to a button on the web page. I assume that the way to do this is to turn this script into feature service and consume this service inside my web application. Any ideas how exactly to do it?
0 Kudos
5 Replies
Kuang-YaoLee
Emerging Contributor
You will need to rewirte all the functions in the web application. There is no way that you can get access to "buttons" in ArcMap Document from your web application.
0 Kudos
JoannaLaroussi
Emerging Contributor
I have never mean access buttons in a ArcMap from a web application. I am looking for the way to extract VBA from a map document, publish it as a service and consume in web application through ArcGIS Server.
0 Kudos
Kuang-YaoLee
Emerging Contributor
OK. You will need to re-write using VB or C# .net in the web application.
0 Kudos
JoannaLaroussi
Emerging Contributor
I am looking for some suggestions how to use this code, because rewriting is not the option (it is legacy script with many thousands of code lines and I cannot take risk that rewriting will change outcomes).
0 Kudos
Kuang-YaoLee
Emerging Contributor
If your VBA code doesn't involve a lot of user interface dialog boxes, I would suggest to use geoprocessing models that can be published to ArcGIS server. Your web application can use geoprocessing tools. (you still need to re-write using Python or VBscript for those tools). On the other hands, if you have a lot of user interface dialog boxes I don't think VBA can be run without opening the MXD.
0 Kudos