Hi.
I have created a toolbox (.atbx) which contains several pythonscripts, which I'm using in a project template. The projects created from the project template has been working fine, and all the tools runs ok. But this week I did some refactoring in a script and created a new project template. The script is tested and runs ok. But it doesn't work in projects based on the new project template.
In my script I have this code
def beregnKortesteVeg(self, punktid, startpunktid, tilknytningspunkter, traceLayer):
fl_tilknytningslinje = r"memory/Tilknytningslinje"
fl_points = "points"
tmp_featurelayer = "tmp_featurelayer"
str_punktid = f"({punktid},{startpunktid})"
arcpy.SelectLayerByAttribute_management(in_layer_or_view=tilknytningspunkter,
selection_type="NEW_SELECTION",
where_clause=f'"OBJECTID" IN {str_punktid}')When looking at the script after the packaging of the project, str_punktid and the where_clause has changed. The code has been subsituted with several ESRI_variables:
g_ESRI_variable_4 = '('
g_ESRI_variable_5 = '"OBJECTID" IN '
def beregnKortesteVeg(self, punktid, startpunktid, tilknytningspunkter, traceLayer):
fl_tilknytningslinje = r"memory/Tilknytningslinje"
fl_points = g_ESRI_variable_2
tmp_featurelayer = g_ESRI_variable_3
str_punktid = g_ESRI_variable_4punktid},{startpunktid})"
arcpy.SelectLayerByAttribute_management(in_layer_or_view=tilknytningspunkter,
selection_type="NEW_SELECTION",
where_clause=g_ESRI_variable_5str_punktid}')These variables (str_punktid and the where_clause) has been the same in all versions of the script and has not changed. Last time I created a working project templated was with ArcGIS Pro 3.2.x, and now I've upgraded to 3.3. In the last version (3.2) these variables was not replaced with ESRI_variables.
Are there any changes to this in 3.3?
Has anyone any resources on what the packaging does and why some variables are replaced with ESRI_variables?