I've generated a File Geodatabase with an Index (Polygon) ; Spot Heights (Points) per index ; and Contours (Polylines) per index. I'm trying to generate a python script that will firstly generate a Feature Layer per index. The name of the Feature Layer needs to be based on the value within the field called TAG per index. The Feature Layer per index needs to be used as the Boundary within Topo To Raster. The associated Spot Height Point Feature Class based on the index name needs to be used as PointElevation within Topo To Raster ; and the Contour Polyline Feature Class per index needs to be used as Contour within Topo To Raster. The output DEM needs to be named after the Index name found within the TAG field. I've attached print screens of the File Geodatabase, the Index Feature Class and Attribute Table within ArcMap to better understand what I'm trying to achieve.The code that I've generated so far is below, either my sql expression is incorrect because it fails as soon as I try to use it within Make Feature Layer. I've not yet worked out how to get the TAG field value out in order for it to be used as the Feature Layer Name>>> import arcpy
>>> arcpy.env.workspace = r'E:\Projects\H109009\Terrain.gdb'
>>> index = "Index10kSelected_5m_WGS84"
>>> with arcpy.da.SearchCursor(index,["TAG"]) as sCur:
... for row in sCur:
... sqlExp = """ {0} = '{1}' """.format(arcpy.AddFieldDelimiters(index,"TAG"),row.getValue("TAG")
... arcpy.MakeFeatureLayer_management(index, To be replaced with "TAG" value,sqlExp)
Any assistance would be appreciated, please be warned, I've just started learning to code.Regards