Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

RuntimeError: cannot open featureclass in python

import arcpy

infc = arcpy.GetParameterAsText(0)

# Enter for loop for each feature
for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@"]):
    # Print the current multipoint's ID
    print("Feature {}:".format(row[0]))

    # For each point in the multipoint feature,
    #  print the x,y coordinates
    for pnt in row[1]:
        print("{}, {}".format(pnt.X, pnt.Y))
Source by pro.arcgis.com #
 
PREVIOUS NEXT
Tagged: #open #featureclass #python
ADD COMMENT
Topic
Name
9+3 =