I need HELP!
Quick Disclaimer: I am NOT A PYTHON PROGRAMMER although I am trying to learn!
Here is the situation:
I am running ArcGISPro 2.8. I have built a model which calculates geometry attributes for a feature class record if it is selected. When I run the model manually without the script, it works, but when I export the model to a script, I get this error:
File "K:\GIS_TOOLS\Toolbox\Toolbox.tbx#GeoCalc_NewToolbox.py", line 6
def # NOT IMPLEMENTED# Function Body not implemented
^
SyntaxError: invalid syntax
See python window for the script. Does anyone know why I am getting this error? I have googled it and I can't seem to get anywhere. 😥
# -*- coding: utf-8 -*-
"""
Generated by ArcGIS ModelBuilder on : 2021-09-16 15:21:14
"""
import arcpy
def # NOT IMPLEMENTED# Function Body not implemented
def GeometryCalc(): # GeometryCalc
# To allow overwriting outputs change overwriteOutput option to True.
arcpy.env.overwriteOutput = False
arcpy.ImportToolbox(r"c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Data Management Tools.tbx")
# Model Environment settings
with arcpy.EnvManager(scratchWorkspace=r"C:\Users\abishop\AppData\Local\Temp\ArcGISProTemp10544\1ba0f558-c873-4c6c-be6d-dc08393016c0\Default.gdb", workspace=r"C:\Users\abishop\AppData\Local\Temp\ArcGISProTemp10544\1ba0f558-c873-4c6c-be6d-dc08393016c0\Default.gdb"):
parcel = "I:\\users\\abishop\\DATA\\CadastreCopy.gdb\\parcel"
# Process: Select Layer By Attribute (Select Layer By Attribute) (management)
parcel_Layer, Count = arcpy.management.SelectLayerByAttribute(in_layer_or_view=parcel, selection_type="NEW_SELECTION", where_clause="GIS_ACRES IS NULL", invert_where_clause="")
# Process: If Selection Exists (If Selection Exists) ()
True_48, False_49 = # NOT IMPLEMENTED(in_layer_or_view=parcel_Layer, selection_condition="EXISTS", count=0, count_min=0, count_max=0)
# Process: Calculate Geometry Attributes (Calculate Geometry Attributes) (management)
if True_48:
parcel_Layer_2_ = arcpy.management.CalculateGeometryAttributes(in_features=parcel_Layer, geometry_property=[["GIS_ACRES", "AREA"]], length_unit="", area_unit="ACRES", coordinate_system="PROJCS[\"NAD_1983_StatePlane_Florida_West_FIPS_0902_Feet\",GEOGCS[\"GCS_North_American_1983\",DATUM[\"D_North_American_1983\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",656166.6666666665],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",-82.0],PARAMETER[\"Scale_Factor\",0.9999411764705882],PARAMETER[\"Latitude_Of_Origin\",24.33333333333333],UNIT[\"Foot_US\",0.3048006096012192]]", coordinate_format="SAME_AS_INPUT")[0]
if __name__ == '__main__':
GeometryCalc()
print("Geometry Calculation Complete")
Amanda Bishop, GISP