Tuesday, 1 November 2016

arcgis desktop - Is there a way to turn on labels with ModelBuilder?



I have a model that creates a feature class and adds it to the map. The properties of the feature class reference a layer file for the symbology. However, I can't seem to find a good way to pass the labels as well so that the feature class is added with the labels visible.


Is there a way to do this?



Answer



No, there isn't a way to do this directly by using the ModelBuilder or GP tools in a model. However, you can use the arcpy Layer properties (showlabels) to make this happen after the model has run. Then either export the model to the Python script or rewrite the model by using Python manually. The arcpy showlabels method will be the last step in your model where you set up the labels to show up.


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...