Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mxd = arcpy.mapping.MapDocument("CURRENT")
- lr=arcpy.mapping.ListLayers(mxd)[0]
- tbl=arcpy.da.TableToNumPyArray(lr,("oid","A","B"))
- bs=sorted(tbl, key=lambda x: (x[1], x[2]))
- aDict={}
- for i,row in enumerate(bs):
- aDict[row[0]]=i
- def sortSeq(fid):
- return aDict[fid]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement