AnsweredAssumed Answered

ArcGISPro Python toolbox problem with cache copy problem

Question asked by pk on Oct 25, 2018
Latest reply on Oct 28, 2018 by pk


I am developing a toolbox for arcgispro 2.2.3.

I have the regular template .pyt file, and  import a regular file which contains my custom code.  I can run the script just fine in arcgispro geoprocessing facility.

If I then modify the .py file, I then refresh in pro.  The pyt flie appears to be refreshed, but NOT the .py file.  The only way I can get pro to re-read the .py file is to close arcgis and re-open it again.  It then reads the py file.  

It would appear that pro holds a copy of the toolbox in a different folder to the folder I am editing?


If I put ALL my code into the pyt file it is ok, but that is very poor programming practise.


many thanks



import arcpy
import surveyestimator
import geodetic
import math

VERSION = "1.0"

class Toolbox(object):
def __init__(self):
"""Define the toolbox (the name of the toolbox is the name of the .pyt file)."""
self.label = "Toolbox"
self.alias = ""

# List of tool classes associated with this toolbox = [SurveyEstimatorTool]

def execute(self, parameters, messages):
"""Compute a survey line plan from a selected polygon in the input featureclass."""

arcpy.AddMessage ("GG Survey Estimator : %s " % (VERSION))
sse = surveyestimator.surveyEstimator()