Python Toolbox - Feature Set Issue 10.2

543
2
05-24-2018 11:53 PM
KeaganAllan1
New Contributor

I have written a Python Toolbox for ArcMap, that allows a user to consume a Template Feature Layer to run through a series of processes.

The user defines an Area of Interest (AOI) in the Tool and then a bunch of Geoprocessing Tools run for this AOI.

I have tested the Tool in ArcMap 10.4 and 10.6 and it works as expected. I asked a user to run it in 10.2 and he produced a result.

I have however managed to get access to two Desktops running 10.2 and the AOI is not displayed correctly.

See the 10.4 image below:

enter image description here

Here is the same tool in 10.2

enter image description here

I have written a Python Toolbox for ArcMap, that allows a user to consume a Template Feature Layer to run through a series of processes.

The user defines an Area of Interest (AOI) in the Tool and then a bunch of Geoprocessing Tools run for this AOI.

I have tested the Tool in ArcMap 10.4 and 10.6 and it works as expected. I asked a user to run it in 10.2 and he produced a result.

I have however managed to get access to two Desktops running 10.2 and the AOI is not displayed correctly.

The Tool is meant to look like this:

enter image description here

When I open the tool in 10.2, in place of the "Tool:: Select your Area of Interest" there is a path to an "in_memory" workspace...of which I have none in my script at all:

enter image description here

Has the way in which the "GPFeatureRecordSetLayer" data type changed between ArcMap 10.2 and 10.4?

I think we should ignore the one time it worked on a 10.2 machine, as I was not there to witness the exact steps taken by the user, and the tool may have run correctly, without the AOI being created - it may have run using information already stored in the AOI Template file.

My code to create this tool is below:

**def getParameterInfo(self):        '''parameter definitions for GUI'''        params = None        param0 = arcpy.Parameter(        displayName = "AOI",        name = "Choose you Area of Interest",        datatype = "GPFeatureRecordSetLayer",        parameterType = "Required",        direction = "Input")         param0.value = r"C:\Data\AOI.lyr"         param1 = arcpy.Parameter(        displayName = "Project Name",        name = "Please provide a project for this search",        datatype = "GPString",        parameterType = "Required",        direction = "Input")         param1.value = "Input Text"         param2 = arcpy.Parameter(        displayName = "Project Identifier",        name = "Please provide an unique identifer for this search - Text Only",        datatype = "GPString",        parameterType = "Required",        direction = "Input")         param2.value = "Input Text"         params = [param0 , param1, param2]        return params**
0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Tracking down something for an old version might be difficult.

You can go through the Issues Addressed links on The... Py... Links to see if anything appears from version 10.3 and up

0 Kudos
KeaganAllan1
New Contributor

Cool thank you.

I will have a look.

0 Kudos