Python Addin & Modelbuilder

1020
4
Jump to solution
02-15-2017 01:47 PM
ChrisHolmes
Occasional Contributor III

Good day everyone,

I have created a simple python addin which works in ArcMap. The addin has 4 buttons, two that execute script tools, two that execute models. The toolbox that the models & script tools are located in is stored in a network folder.

The buttons use pythonaddins.GPToolDialog() to execute a model/script tool stored on the network.

This simple diagram shows the layout:

My question is:

1. When a button is clicked on the addin on the local PC, where does the model or script execute?

2. Are there any risks if multiple PC's are accessing the toolbox on the network drive at the same time?

Thanks,

Chris

0 Kudos
1 Solution

Accepted Solutions
NobbirAhmed
Esri Regular Contributor

The tools run on the executing machine. However, the input and output come from the data source defined in the Python script (for script tool) or in ModelBuilder paths. If the path is set to one of the remote machines then data will come from or go to that particular machine.

View solution in original post

4 Replies
ChrisHolmes
Occasional Contributor III

Anyone?

Thanks

0 Kudos
RebeccaStrauch__GISP
MVP Esteemed Contributor

Are you installing on each machine by double clicking the .addin ? If so, it actually installs locally in the users AppData I believe.  My guess is if you are getting the toolbox, something has to be installed locally. But I can't answer your question for sure.

Typically I do all my development on a network drive, use the toolbox for testing locally, but when ready to use the addin, I install that locally with the .addin.  I include all the scripts, toolboxes, connection files in relative pathe within the python development structure, so the addin can find everything.  

If you are running the tools and working on the same shared data, normal locks would still apply, but I would think that using the same tool, if working with local data, should be ok.

but I'm just guessing.  

Tagging a few other groups  https://community.esri.com/community/gis/analysis/geoprocessing?sr=search&searchId=332a13c8-78a7-469...https://community.esri.com/groups/python-addins?sr=search&searchId=56e3b0a3-fa41-43a3-8f46-35ad30049...‌ fir more exposure.

ChrisHolmes
Occasional Contributor III

The addin is installed on each machine by double clicking the .esriaddin

The buttons on the addin just link to models and script tools stored in the .tbx files which are on the network.

Thanks for replying Rebecca.

Sent from my iPhone

0 Kudos
NobbirAhmed
Esri Regular Contributor

The tools run on the executing machine. However, the input and output come from the data source defined in the Python script (for script tool) or in ModelBuilder paths. If the path is set to one of the remote machines then data will come from or go to that particular machine.

View solution in original post