POST
|
Has anyone found a solution or workaround to this? Thanks, Tim
... View more
05-24-2013
03:14 AM
|
0
|
0
|
359
|
POST
|
My script went immediately from arcpy.ApplySymbologyFromLayer_management to arcpy.mapping.ExportToJPEG with no intermediate steps. Changing break values in between would probably cause the outlines to change.
... View more
03-23-2013
12:15 PM
|
0
|
0
|
452
|
POST
|
I am having the same issue. Were you able to get around this issue? Can you please post the code with the workaround. I am still having issues with the symbology outlines. Thank you in advance! Yes, I worked around it as I described in post #8 in this thread. Did you follow those steps? What part isn't working for you? I'm reluctant to post the whole script (it's fairly complex).
... View more
03-22-2013
04:37 PM
|
0
|
0
|
849
|
POST
|
Jeff: I thought again about what you wrote about the ApplySymbologyFromLayer GP tool, and I realized that combining that with the method of changing the underlying data I mentioned earlier yields the solution I was looking for. Thanks for the help! Here is the whole approach, in case someone else wants to do the same thing before the bug gets fixed: Do the following by hand: Set up two layers in the MXD, named mainLayer and donorLayer. Each layer should have a field named mainField. The layer named mainLayer should have the fields you want to use to create the JPEGs. Set up the symbology in donorLayer, using mainField as the value field. Make mainLayer visible and donorLayer invisible. (Alternately, donorLayer could be a separate layer file or in a separate MXD.) In the Python script, loop through each field you want to use, doing the following for each: Use arcpy.da.UpdateCursor to copy the values of the field into mainField. Use arcpy.ApplySymbologyFromLayer_management to copy the symbology from donorLayer to mainLayer. The similar function arcpy.mapping.UpdateLayer does not work here. Use arcpy.mapping.ExportToJPEG to create the JPEG.
... View more
12-10-2012
04:03 PM
|
0
|
0
|
849
|
POST
|
Maybe I'm missing something, but I don't see how that solution helps. Suppose I have 50 fields in my data, and I want to create 50 jpegs using the same symbology for each field. As you said, to use the ApplySymbologyFromLayer GP tool, the seed layer file must use a field that is named the same as the field in my data. So I would need to make 50 seed layer files by hand, one for each field in my data, right?
... View more
12-10-2012
06:36 AM
|
0
|
0
|
849
|
POST
|
Jeff: Thanks for the response. If I understand your workaround correctly, I would need to create a layer or MXD by hand for each of the fields I want to use and set up the symbology for each one. That's the part I want to automate--I have dozens of fields. I tried a new approach: changing the underlying data. I set up a field named mainField and used that as the value field in the symbology. Then in the Python script, for each of my other fields, I used arcpy.da.UpdateCursor to copy the values of the field into mainField and then I exported to JPEG. The values of mainField get set correctly and the fill colors and outlines are right, but the class breaks are still based on the original values of mainField. As you said, using symbology.reclassify causes the outlines to turn gray. You mentioned using symbology.classBreakValues instead, but when I tried it, the outlines turned gray--am I missing something?
... View more
12-04-2012
06:00 AM
|
0
|
0
|
849
|
POST
|
I'm using graduated colors symbology with quantiles, and I have different fill colors and outline colors for the different quantile categories. My python script loops through several fields, and for each field it sets the layer's symbology.valueField to the new field and creates a JPEG using arcpy.mapping.ExportToJPEG. The quantiles recalculate correctly based on the new field, and the fill colors for each quantile group remain correct, but the outlines all change to gray. How can I keep outlines the same (or reset them after they change) when I change the value field? I don't see any way to to set the outline colors directly using Python. I tried setting up a layer with the correct symbology and applying that (using arcpy.mapping.UpdateLayer and, in a separate attempt, arcpy.ApplySymbologyFromLayer_management) to my main layer after switching the value field. But it appears that these functions set the symbology value field in addition to the fill colors and outlines. I'm using ArcGIS 10.1.
... View more
12-03-2012
04:24 AM
|
0
|
18
|
6433
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|