masterlist = masterlist.split(',')
if fc in masterlist: print('{0} has {1} features'.format(fc, fcrecs)) dcount[fc] += fcrecs
masterlist = "CoreTestLocation,CoverToReo,Defect_Areas"
dcount = {'CoreTestLocation': 0, 'CoverToReo': 0, 'Defect_Areas': 0,}
fcrecs = int(arcpy.GetCount_management(fc).getOutput(0))
if string.find(masterlist,fc) != -1: [INDENT]print fc + " has " + str(fcrecs) + " features" currentval = dcount[fc] newval = currentval + fcrecs dcount[fc] = newval [/INDENT]
for i in range(10): fcNames['fc1'] += 1
>>> fcNames = {} >>> type(fcNames) <type 'dict'> >>> >>> fcNames['fc1'] = 3 >>> print fcNames {'fc1': 3} >>> >>> fcNames['fc1'] 3 >>> >>> fcNames['fc2'] = 10 >>> >>> fcNames {'fc1': 3, 'fc2': 10} >>> >>> for i in range(10): i = fcNames['fc1'] i += 1 fcNames['fc1'] = i >>> fcNames['fc1'] 13 >>> fcNames {'fc1': 13, 'fc2': 10} >>>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.