Select to view content in your preferred language

Python Tool current project

513
0
11-22-2022 03:55 PM
CA_SC_-_EricBall__GISS_
Occasional Contributor

I have written a couple python tools in a python toolbox in ArcPro 2.9.

The tools I have written are make changes to all projects within given folder. During initial development, I used notebooks in arcpro and used the code:aprx = arcpy.mp.ArcGISProject("CURRENT")  which worked. Once I converted over to an actual python tool/script, the code is changed to affect all projects, which also works (as long as I am out of an affected project).

So, right now I have to open an empty project (or at least one not within the targeted folder) to run the tool so that all projects within the targeted folder are affected. I would like to be able to open one of the projects within the folder and still have it affect it along with the others... is there a way to do this from the tool (not notebooks or python window)?

0 Kudos
0 Replies