Is it possible to work with ArcGIS Pro scale-based symbol classes in code?

561
1
Jump to solution
11-21-2017 08:57 AM
RobertJones11
New Contributor II

New in Pro are scale-based symbol classes as described here under the heading 'Show different symbols at different scales': pro.arcgis.com/en/pro-app/help/mapping/symbols-and-styles/scale-based-symbol-classes.htm

I have a complex mxd that I wish to convert to use scale-based symbol classes, and believe it will be far quicker to script this rather than attempt it manually. Is the functionality behind the Scale Range View in the Symbology pane exposed in ArcPy or API? I searched the online documentation for both but could not find references to changing symbol class scale range. This seems to me like a significant omission, especially given that using the Scale Range View can involve lots of finicky mouse clicking and spinny icon waits after each change.

0 Kudos
1 Solution

Accepted Solutions
RobertJones11
New Contributor II

I made some progress. I added some scale-based symbol classes to a layer and saved the layer to disk as .lyrx format. The .lyrx file contains JSON text. Examining the JSON it appears that the scale-based symbol classes are written to an object with the name 'alternateSymbols'. This gives me a route to hacking the JSON via Python etc. Hopefully in time the functionality will be available via a proper Esri tool.

View solution in original post

0 Kudos
1 Reply
RobertJones11
New Contributor II

I made some progress. I added some scale-based symbol classes to a layer and saved the layer to disk as .lyrx format. The .lyrx file contains JSON text. Examining the JSON it appears that the scale-based symbol classes are written to an object with the name 'alternateSymbols'. This gives me a route to hacking the JSON via Python etc. Hopefully in time the functionality will be available via a proper Esri tool.

0 Kudos