Hello,
Perhaps this is really an Arcmap question, but I am using arcpy.searchcursor to find new records, perform a definition query on a polygon, and create maps from the polygon outline. Everything works as intended except after the first map, subsequent maps have a polygon with the blue selection outline. Ive tried a few things to eliminate this. One workaround I have considered is creating a new layer from the definition query, and removing the old layer. I have also changed the options in Arcmap to not use blue as a selection color.
I suppose this has something to do with the searchcursor, but I am not sure how to get around that.
Thanks for looking
Paul Frank
Solved! Go to Solution.
Without inspecting your script, have you run (or considered running) Select Layer By Attribute, specifying CLEAR_SELECTION as the selection method, to remove the selection from your layer?
Without inspecting your script, have you run (or considered running) Select Layer By Attribute, specifying CLEAR_SELECTION as the selection method, to remove the selection from your layer?
Glad you figured it out. As a postscript, if you're interested and using 10.1+ (I think), you may want to look into using arcpy.da.SearchCursor(). They're faster and don't require "nexting".
Darren,
Now I think you were correct the first time. I ran it again and my fix didn't work. So then I looked at it again, and I am using 2 versions of the same layer in this mxd, so I went back and added your code to the other layer, and everything looks correct now. I am still a little foggy on what is going on but it seems to work. Again, thanks!