First of all, you are running on a sweet setup, 10.2 is solid to work with in terms of extending functionality of the application through automation with Python! (I am jealous). Just curious, why you are associating what seems like a "random" floating table with shapefiles - shouldn't those features be tied with their respectable attributes? If this were the case, it would be SO much easier to automate (less convoluted and complex of an analysis project), since you could utilize the Select Layer by Attribute etc. i.e. draw from the power of querying alone, using python, and the script would select the diff polygons from the shapefile based on this boolean condition you have set up. Search Cursors are very powerful but can get very tricky, as we see here I suppose.. - extreme patience is needed of course when debugging. PS, Filip's code looks really clean and easy to work with, hope that works out for you. As is expected though it will most likely break the first few times you try and run it on a different machine! Part of the fun though right?! I second (Filip's comment above) using the print statements to test different snippets of the code. Very very helpful to me in the past as well indeed! I pretty much structure my whole debugging workflow based on print statements and commenting in and out. I also suggest (if you haven't tried this before) commenting out your entire code initially, and running it block by block, un commenting as you go - best for easily locating exactly where the code is breaking... Post the code that works if you get it running, I am really curious to see what runs! Also thanks for posting this in the first place.. its been a little while since I've worked with it and nice to read through to keep skills sharp!
... View more