I'm trying to create an ArcGIS python toolbox tool which use 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 in a normal toolbox. This is done using a Feature Set variable and set 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)