Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Never ending While Cant figure out my error?

$
0
0
Code:

for row in wtlndRow:
       
        if row.WtlndUnitID is None:
            totalArea = 0
            wtlndUnitID += 1
            adjWtlnd = arcpy.MakeFeatureLayer_management(wtlnd4Units, "in_memory\\adjWtlnd")
            arcpy.SelectLayerByLocation_management(adjWtlnd,"SHARE_A_LINE_SEGMENT_WITH",row.shape, "", "NEW_SELECTION")
            numPolys = 1
            count = 0

            while numPolys != count:
                numPolys = arcpy.GetCount_management(adjWtlnd)
                arcpy.SelectLayerByLocation_management(adjWtlnd,"SHARE_A_LINE_SEGMENT_WITH", wtlnd4Units,"",  "ADD_TO_SELECTION")
                count = arcpy.GetCount_management(adjWtlnd)


Cant figure out why this wont evaluate to true.
Thanks!
Alicia

Viewing all articles
Browse latest Browse all 2485

Trending Articles