I have a python script embedded within a modelbuilder tool. I want to set it up to accept as input, the output of one tool, a set of selected features (called "Contained Paths" in the image). The script tool itself is "OD Path Align Tool"
In the script, I want to run these through a searchcursor. How do I access the feature layer in the script?
I have included the relevant portions of my code below.
Clarification: Am I doing this correctly? If so, the error is likely somewhere else.
#Parameters#P0 - "contained paths" feature layercPaths = arcpy.GetParameterAsText(0) # contained pathsfields = (field1,feild2)#cursorwitharcpy.da.SearchCursor(cPaths,feilds) as myCursor: for row in myCursor: pass #dummy code
أكثر...
In the script, I want to run these through a searchcursor. How do I access the feature layer in the script?
I have included the relevant portions of my code below.
Clarification: Am I doing this correctly? If so, the error is likely somewhere else.
#Parameters#P0 - "contained paths" feature layercPaths = arcpy.GetParameterAsText(0) # contained pathsfields = (field1,feild2)#cursorwitharcpy.da.SearchCursor(cPaths,feilds) as myCursor: for row in myCursor: pass #dummy code

أكثر...