Monday 30 November 2015

arcgis desktop - How to get/set label scale ranges (e.g. minScale) in ArcPy?


For a layer object lyr, one can programmatically set the minScale in arcpy as such:


lyr.minScale = 150000

For a label, one can manually set the scale range within a dialog in ArcMap. In arcpy, is there a way to programmatically set the minScale for a layer's label in much the same way one can for the layer itself?


I see that it can be done through the JavaScript API, but I haven't yet found a way via arcpy. (I have ArcMap 10.1 SP1.)



Answer



I looked at the LabelClass (arcpy.mapping) properties, which is where I believe this would need to be exposed and there is no such property available there either.


Consequently, for this one I suspect your best option will be to submit an ArcGIS Idea.


There is a generic idea to Expose the ArcMap layer properties through ArcPy which may lead to it being added.



However, I think we will see this functionality sooner if a specific one is submitted. If you do that post a link to it into your Question so that future visitors can also vote for it.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...