I would like to generate a tool in Python-Addin ArcGIS as the image attached. I also like to generate the save and load button in the tool. My purpose is that when the user chooses the range parameters and then clicks the save button, those parameters can be saved and next time if the user would like to reuse the parameter, they can load it. This is my python script but I do not know which types of python-addin should be put in my scriptenter image description here

    import arcpy, arcgisscripting,math
    import pythonaddins
    import  pandas as pd
    import os, glob

    from arcpy import env
    arcpy.env.overwriteOutput = True
    from arcpy.sa import *


    if (range_2==''):
       outFocalStat = FocalStatistics(input, NbrAnnulus(range_1, range_1, "CELL"),
                           "MINORITY", "NODATA")
       outFocalStat= FocalStatistics(input, NbrAnnulus(range_2, range_2, "CELL"),
                           "MINORITY", "NODATA")

  • 1
    Customizing a script tool like that isn't possible. An alternative route could be adding a "remember" checkbox which writes out the settings, then loading them on tool open through validation
    – mikewatt
    Nov 24, 2020 at 23:35
  • @mikewatt: Thank you for your suggestion. If it is possible, could you please write a code how to add a remember checkbox? Thank you.
    – user30985
    Nov 25, 2020 at 2:22


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.