0

I'm using ESRI's LocalGovernmentMI.gdb data model and am managaing parcel data in a ParcelFabric dataset. I'm trying to use a search cursor on the ParcelFabric_Parcels dataset but I recieve this ...

RuntimeError: cannot open 'P:\Mapping\Data\LocalGovernmentMI.gdb\ParcelEditing\ParcelFabric\ParcelFabric_Parcels'

I'm using this but of code ...

import arcpy

fc = r'P:\Mapping\Data\LocalGovernmentMI.gdb\ParcelEditing\ParcelFabric\ParcelFabric_Parcels'
field = "Name"

with arcpy.da.SearchCursor(fc, field) as cursor:
    for row in cursor:
        print (row)

If I export the dataset and run the search cursor on that data it works. Any thoughts?

  • What are you trying to achieve? – gm70560 May 21 '13 at 17:25
  • I'm in the processe of trying to build a Python add-in tool that takes an input value ( user clicks on a parcel, a SelectByLocation task is executed using a PointGeometry, then the value from the "Name" field of that selected parcel is passed to the search cursor which will help identify all parcels having that value). – dchaboya May 21 '13 at 17:40
3

Arcpy.da.SearchCursor accepts, "feature class, layer, table, or table view" as the in_table. After looking at the Parcel Fabric page, I would suggest Make Parcel Fabric Table View (Parcel Fabric). This will give you a temporary table to use with the cursor.

  • Thank you, this works. Would have been better to use the cursor on the parcel fabric dataset, but i'll still take it. – dchaboya May 21 '13 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.