Hello, I'm having trouble with the ordering of my legend.
When I export a map using Python, the layer order automatically changes to alphabetical.
For example, instead of the correct order (1–15), my legend appears as:
1-10-11-12-13-14-15-2-3-4-5-6-7-8-9
I'm running the Python script in a PythonCaller within FME. When exporting manually in ArcGIS Pro, this issue does not occur—it only happens when exporting through my FME workspace and Python script. The layer order setting is turned off, but even when I turn it on, it doesn't make a difference. In the python script itself, there is no piece of code regarding this sorting or regarding the legend.
Is there a way to prevent this automatic alphabetical sorting? Thank you in regard!