I'm writing a Python script tool that will generate a map and am stumped on one item. The user enters the fire station number, the minimum area (in square feet) of structures to be displayed, and up to seven optional layers. The tool will then create a PDF of the map.
Everything else works fine but I keep getting an error on the structure size (SHAPE.AREA). The code for this particular part is:
sqft = arcpy.GetParameterAsText(2)
stru = m.listLayers('Structures')[0]
stru.definitionQuery = """{} >= {}""".format(arcpy.AddFieldDelimiters(stru, 'SHAPE.AREA'), sqft)
The tool parameter for sqft is set to Double. The script completes without crashing, however the structure layer does not display and I get an error if I try to open the attribute table: "Underlying DBMS error [ORA-00904: "SHAPE.AREA": invalid identifier]. Manually setting the definition query to SHAPE.AREA >= 5000 works fine, but I can't get it to go in Python. I'm using ArcGIS Pro 2.3.1; I have not tried building the map and tool with ArcMap.
Thanks in Advance,
Charlie