AnsweredAssumed Answered

Copy out Feature Class Field information to a Table

Question asked by LarryAdgate on Nov 1, 2018
Latest reply on Nov 1, 2018 by LarryAdgate

#Thank You in advance for any assistance to my question:
#For inventory purposes, I need to download information from several featureclass text fields and copy out that information into a single dbase table.  
#The script below works well for copying out one field only, but what about copying out two or more separate fields? See attached     
#Any download order should mirror its orginal featureclass. I Tried using a dictionary, but that requires a Key so I am not sure how to anwser my question, please help  

import arcpy

fc1 = "C:\\AppleValleyNorth.GSW_SDE.wNetworkStructure"
fc2 = "C:\\AppleValleySouth.GSW_SDE.wNetworkStructure"
fc3 = "C:\\MyResults"

myfcs = fc1,fc2

for mygroup in myfcs:
    with arcpy.da.SearchCursor(mygroup,['STRUCTTYPE']) as cur:
        for myset in cur:
            cursor = arcpy.da.InsertCursor(fc3, ["STRUCTTYPE"])
            for i in myset:
                cursor.insertRow([i])
                print myset

Attachments

Outcomes