AnsweredAssumed Answered

How do I make my python script portable for ArcMap users?

Question asked by Higham.chr@gmail.com on Nov 21, 2018
Latest reply on Nov 21, 2018 by Dan_Patterson

Here is the situation: I am using ArcGis Pro to create a tool, but my associate wants to use the tool in ArcMap 10.6. I ensured that my python was written so it could be interpreted by both ArcGIS Pro 2.2 and ArcMap 10.6 by creating a separate tool in the toolbox, but the second was created in ArcMap. Both tools used the same python file, and both functioned properly. I thought I embedded the python file in both tools.

 

I troubleshooted by sending the toolbox to another computer via email. The script tool I created in ArcGIS Pro for ArcGIS Pro works. The script tool I created in ArcMap for ArcMap gave me an error that the file does not exist. 

 

My thought is that when I embedded the python file in each script tool, the tool for ArcGIS Pro kept the file somehow, but the ArcMap tool did not. Maybe I am supposed to store the Python file in the toolbox itself to make it portable for the ArcMap script tool? This is my source for why I suspect this is the case: http://desktop.arcgis.com/en/arcmap/latest/analyze/sharing-workflows/embedding-scripts-and-password-protecting-tools.htm

 

However, if this is the problem, I do not know how to save the python file in the toolbox. If it not the problem, I don't know what to do to make my script tool for an ArcMap user more portable. 

 

Thoughts?

Outcomes