How do I set the IDE for Python in ArcGIS Pro to let me edit the scripts of GUI tools?

858
6
09-14-2020 04:30 PM
muqdadAl_hamami
New Contributor II

Hi all, 

I have a problem setting the IDE by ArcGIS pro when I right-click a script and select Edit. I have tried to enter the file path (i.e. files like IDLE)  under the geoprocessing option but still non-active when right-clicking on any tool, Edit is still hidden, not active. Any help please to activate the editing option?

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

The toolbox structure has changed in 2.6.*

You can't edit them via the right-click method.

Read on if you are fully versed in working with python....

The toolbox is located in the folder  ( note.... arc_pro ... is my arcgis pro installation folder so change accordingly)

C:\arc_pro\Resources\ArcToolBox\Toolboxes\Spatial Statistics Tools.tbx\BuildBalancedZones.tool

The script is....

C:\arc_pro\Resources\ArcToolBox\Toolboxes\Spatial Statistics Tools.tbx\Spatial Statistics Tools.pyt

and associated files

C:\arc_pro\Resources\ArcToolBox\Toolboxes\Spatial Statistics Tools.tbx\toolbox.content

etc

and Build Balanced Zones is therein

Spatial statistics associated scripts are located in the folder

C:\arc_pro\Resources\ArcToolBox\Scripts

Finally the script.... Spatial Statistics Tools.pyt script contains the class

class BuildBalancedZones(object)

on line 11,118

Don't mess with the installed scripts unless you know exactly what you are doing


... sort of retired...
muqdadAl_hamami
New Contributor II

Thanks, sir for your kind reply, could you please let me know how can I do it by ArcMap 10.8 instead of using ArcPro because it is more complicated than before.  Thanks again

0 Kudos
DanPatterson
MVP Esteemed Contributor

Sorry... I haven't used ArcMap is years


... sort of retired...
0 Kudos
muqdadAl_hamami
New Contributor II

Actually, I tried to use your instructions that published in the old thread (in 2018) and apply that steps on the old AcrPro 2.3 version but it also does not works.  However, I went yesterday to the Spatial statistics associated scripts that are located in the folder

C:\arc_pro\Resources\ArcToolBox\Scripts

I found the scripts of tools but the names of these scripts are not matched with the names on the toolbox list, so is there any way to match between the scripts on that folder and the names of tools on the list of ToolBox?

Thanks again, sir.

0 Kudos
DanPatterson
MVP Esteemed Contributor

As I somewhat indicated earlier,  BuildBalancedZones isn't a separate "script" but is a called class in the *.pyt script listed below

Finally the script.... Spatial Statistics Tools.pyt script contains the class

 

class BuildBalancedZones(object)

 

on line 11,118


... sort of retired...
DanPatterson
MVP Esteemed Contributor

Addendum.

What I describe is for Pro 2.6.1.... Pro 2.3 uses the 'old' way of describing toolboxes. 

An upgrade would be prudent


... sort of retired...
0 Kudos