Problem Writing Attributes w/ UpdateCursor

Discussion created by shudak on Jan 9, 2013
Latest reply on Jan 9, 2013 by Caleb1987

I have two feature classes with features snapped together. In one area I might have 3 points from feature class A, and 3 points snapped to those points 1:1 from feature class B. The points from A have several attributes that need to be written over to the points in B that are snapped to them. For those familiar with electric transmission I have support structures and guy wires (as points) and am testing using just the symbol rotation attribute.

I am writing a python script to facilitate this. These several attributes will go to fields with the same names in feature class B features. I am using the idea that where an INTERSECT occurs, I can select the attributes, store them in a list in sequence, then use the Update Cursor to write the list in sequence to the features in feature class B.

I am able to build my sequential list, but no matter how hard I try I cannot for the life of me get that list to populate the attributes in the other feature class. If anyone can look at my code and give me ideas or perhaps provide me a better way to do this, I would appreciate it. This operation is necessary for many thousands of points.

The code is as follows with some comments:

import arcpy

SSLayer = "C:\\............T_SUPPORTSTRUCTURE"
GuyLayer = "C:\\.............T_GUY"

SRlist = []

    # Make a feature layer with Support Structures
    arcpy.MakeFeatureLayer_management(SSLayer, "AllSSLayer")

    # Make a feature layer containing only the Guy Wires Layer

    # Apply a spatial selection of guy wires to the Support Structures layer

    # Open a search cursor on the Support Structures layer
    rows = arcpy.SearchCursor("AllSSLayer")
    row =

    # Create a sequential list of the symbol rotation of all the selected support structures
    while row:
       row =

    # Clean up cursor and row objects
    del row
    del rows 
    print arcpy.GetMessages()


    # create an update cursor on the guy features
    rows = arcpy.UpdateCursor("GuyLayer", SYMBOLROTATION)
    while row:
        for row in rows:
            for i1, v1 in enumerate(SRlist):
                if row.SYMBOLROTATION == 0:     
                    row.SYMBOLROTATION = v1
        row =

    del row
    del rows 

    print arcpy.GetMessages()

# Clean up feature layers

Again, any help would be much appreciated.