How to make Microsoft Access 365 “talk” with ArcGis Pro through VBA, Python or other technique?

690
2
12-17-2021 07:16 AM
janeinar
New Contributor

Hi. I have been trying to convert a “legacy” Microsoft Access application integrated with ArcGis 10 to ArcGis Pro. The application is “remoting” ArcGis via various VBA scripts (to perform 5 different tasks inside ArcGis). But I can’t find any samples or documents describing how solve this with ArcGis Pro SDK.

Both systems, that is MSAccess and ArcGis are connected to same SQL database, and this works fine. But how may I send “instructions” from Access asking ArcGis Pro to perform certain tasks?  (like searching, and showing objects from a given list of id’s). Today this is done using ArcObjects inside Access VBA... But this option is no longer available in ArcGis Pro.

By the way, the MSAccess application is quite large, and distributed to a large number of customers. It is a Forestry management system.  Containing more than 100 forms, also including an advanced query solution, where users may create custom queries, based on different wizards etc, and have the result from these queries shown in ArcGis… So, I hope not to rewrite this windows desktop system into another language / tool (will take years).

 

janeinar_1-1639753969340.png

 

Anybody have a clue on how to solve my problem?

0 Kudos
2 Replies
KirkKuykendall1
Occasional Contributor III

You might try changing your MS Access VBA to write to files in a directory that an ArcGIS Pro addin watches using the FileSystemWatcher.  When a file appears, the addin would open it, and perform whatever action is defined in the file.  That's assuming messages just go one way.  The "Get " messages makes me think the communication needs to be two way though.

GKmieliauskas
Esri Regular Contributor

Hi,

Another way is to write standalone application using ArcGIS Pro CoreHost library. Using VBA you can start  new process with your standalone application, write results to file and read result file when process finishes. How to start process you can find here:
https://stackoverflow.com/questions/20917355/how-do-you-run-a-exe-with-parameters-using-vbas-shell 

0 Kudos