I have a selection of polygon feature and with a cursor loop I walk through them. I determine the extent of eachfeature and arcmap will zoom to the feature. My default selection color in ArcMap is light-blue. So the whole selection is light-blue. After determining the extent of each feature I create a png-file on disc. Is there a way that the corresponding feature for the selected cursor row will be red before I create my file on disc.

  • arcpy does not configure symbology for layers directly. It can only use the symbology of existing layers. So you would have to test using two layer files that have the selection color with one in red and one in blue to see if arcpy can switch the selection symbology using them. I am not sure it can. It can change the main symbology, but I am not sure about the selection symbology. Anyway, without some foreign PDF module for Python and layers in your PDF you could not manipulate the PDF directly. I don't know how you might come up with that. Go to Google for that option. Commented Jun 24, 2015 at 13:13
  • Of course I should ask, Why don't you make your layer with a selection color that actually works for your output in the first place? I would, even if I had to save a new mxd just for this one purpose. Commented Jun 24, 2015 at 13:17
  • In this situation i am using a clone of the same layer sitting above parent. Modify definition query of clone to show one feature only, e.g. clone.definitionQuery='objectid = 1'. No need to select record in parent, just zoom to feature extent
    – FelixIP
    Commented Jun 24, 2015 at 19:00

1 Answer 1


If you have more than one feature already selected on your layer and you are running your cursor on this layer (i.e., selected features), you may prefer to use SQL query argument (i.e., where_clause, see for example Search Cursor) of the cursor(s) instead of actual selection. If this selection is based on a simple query via Select By Attribute, you can just replace this with aforementioned where_clause.

Colour issue can be handled via Selection Menu>Selection Option and you will see the default selection colour option.As far as I remember it remains saved in the mxd, does not change original selection colour for your other maps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.