I'm trying to create an ArcGIS Python Toolbox tool which uses a polygon for input.
I want the user to be able to create the polygon when the tool is run.
I know how to do this using both a ModelBuilder model A quick tour of using Feature Set and Record Set and for a Python Script tool in a normal toolbox. This is done using a Feature Set variable by setting the schema to a polygon feature class.
I know from here Defining parameter data types in a Python toolbox that the datatype for Feature Set in a python toolbox is GPFeatureRecordSetLayer.
If I define the parameter as below it is not possible to create a polygon at run time. I’m almost 100% sure that this is because I have not set a schema. But does anybody know how to set the schema or know if there is some other way to interactively create a polygon and use as input for a Python Toolbox tool?
InteractiveParameter = arcpy.Parameter(
displayName="Interactive polygon",
name="toolname",
datatype="GPFeatureRecordSetLayer",
parameterType="Required",
direction="Input",
enabled = True)