I am working with an empty feature class where I am writing a script to create polylines within the featureclass and attach an associated text value with the polyline.
I am using a for loop as noted below to insert the polyLine feature while updating a previously created field with the name of the polyline. Wonder if someone could provide some guidance as I cannot seem to get the name to write to table. The polyline creation works perfectly its just adding the name to the table that is providing some difficulty. The last bit code I know does not work.
for key in dictionary: cursor = arcpy.InsertCursor(trackPolyLine) feature = cursor.newRow() polyLine = arcpy.Polyline(dictionary[key], prjCode) feature.shape = polyLine cursor.insertRow(feature) name = arcpy.UpdateCursor(trackPolyLine) key.PolyLine_Name = key dictionary.updateRow(key)