Hi everyone, i created a simple map switcher in python and I put it in a toolbox script.
the script receives as input:
- aprx project;
- map name to be deleted (from aprx project);
- input mapx with the new map;
- pagx exporting checkbox;
- exported pagx path.
The script performs the following operations:
- Project backup;
- Deleting target map;
- Loading new map;
- Renaming new map as deleted one;
- Optionally export layout as pagx file with new map.
If executed in "stand alone" from windows shell, the script works perfectly but, if inserted in a toolbox script, launched from ArcGIS (in a blank project) the execution remains stuck at the deleteItem command.
Why? I can't find any reason.
Somebody can help? (script and validation attached).
Thank you in advance.
Tested with ArcGIS Pro 3.3.1 and 3.4
Windows 10 Pro for Workstation
22H2 build 19045.4894