AnsweredAssumed Answered

arcpy.da.insertCursor w/ dictionary as input...

Question asked by KevinBellSLC on Jun 18, 2012
Latest reply on Jun 19, 2012 by KevinBellSLC
I'm trying to pump the key and value of a dictionary through a da.insertCursor and I'm floundering...

the dictionary is structured like this:

(420957.9933000002, 4510316.955): [51217.156,
                                    59376.688,
                                    93876.453,
                                    127022.82,
                                    163947.11,
                                    148067.66,
                                    135979.39,
                                    108321.33,
                                    67035.406,
                                    45043.16,
                                    37991.52,
                                    36629.535,
                                    115.57169,
                                    110.87349,
                                    175.09225,
                                    238.25777,
                                    330.70523,
                                    322.0,
                                    329.24261,
                                    276.23621,
                                    191.93385,
                                    136.51129,
                                    112.5774,
                                    86.31971]}

and my cursor code looks like so:

print '\n' pprint.pprint(allData)     fieldList = ['SOL1', 'SOL2', 'SOL3', 'SOL4',             'SOL5', 'SOL6', 'SOL7', 'SOL8',              'SOL9', 'SOL10', 'SOL11', 'SOL12',             'DUR1', 'DUR2', 'DUR3', 'DUR4',             'DUR5', 'DUR6', 'DUR7', 'DUR8',             'DUR9', 'DUR10', 'DUR11', 'DUR12']  fc = r'C:\gis\solarTESTING\default.gdb\points' c = arcpy.da.InsertCursor(fc,('SHAPE@XY', fieldList))  for k,v in allData.iteritems():     row =(k,v)     c.insertRow(row)  del c 


What am I doing wrong here?!

Outcomes