"Apply Symbology From Layer" tool - Use the source layer's category order

01-11-2015 07:48 AM
Status: Open
MVP Honored Contributor
When I use the Apply Symbology From Layer tool on a layer it does not respect the order of categories from the source layer and resorts the categories in ascending order.  The behavior of this tool should be like that of the Symbology Import button, which respects the source layer's category order.  Having to reorder symbols is very time consuming and will cause repetitive motion injuries due to the number of mouse clicks it takes to reorder symbols, since each symbol can only move up or down one row at a time and there are no Move to Top or Move to Bottom buttons available to sort the symbols.

The picture below shows what a layer looks like after using the Add All Values button in the symbology dialog.  The symbols are assigned random colors with labels showing the raw category names and the categories are in Ascending order, which is not a logical order for these categories.  This is what I have to start with if I have never set up this layer before.  I have to fix all three settings (symbols, labels, and category order) which can easily take an hour and hundreds of mouse clicks.

In Desktop if I want to apply a preset symbology, labeling and category order I can use a previously saved layer file to do that.  All three settings (symbols, labels and order) are important.  When I use the Import button all three items are set to match the layer file.  This is everything the way I want it.  After the layer has been configured and saved to a layer file once, I can reuse the set up on other data layers that have this field by doing about 3 to 5 mouse clicks in Desktop.

However, when I use the Apply Symbology From Layer tool, only the symbology and labeling match the saved layer file, but the category order is reset to Ascending order, even if the categories of the target layer were sorted in the order I wanted them before I used that tool.  There is no way to automate the symbol category order with Python or Model Builder.  To reorder these fields the way I want them takes approximately 400 mouse clicks (I counted 392 clicks trying to do this in as optimal a way as I could think of).  And this is a small number of symbols compared to most of my layers.
1 Comment
I should have said: "There is no way to automate the symbol category order with Python or Model Builder without destroying the symbol settings."  I can use the arcpy.mapping UniqueSymbolValues methods to reorder the symbols, but symbology will be reset to random symbols if I use the classValues property of the layer to resort the category classes.  Setting up symbols is about as time consuming and difficult as reordering fields, so I am caught between a rock and a hard place if I want to use Python or Model builder to borrow layer symbol settings.