0

I did design a simple and quick tool with ModelBuilder that takes a point feature class in my GDB and does two joins and export to another feature classes, then, the tool appends these two feature classes into a new one being the previous ones removed. This last one will show labels with a symbology based on a layer file I created previously but the result will still be labels and I need annotations.

I know the process is easy to perform and only requires a couple of clicks more (right click on the feature class > label to annotations) but I would like to insert this bit within the model builder tool as well.

I do not see any way to achieve this, any ideas?

1

Tiled Labels To Annotation should be the tool you are after, otherwise I would look into making a small script that does this. The following script template is provided by Esri for ArcGIS Pro, but should work for ArcMap just as well:

# Name: ConvertLabelsToAnnotation.py
# Description: Find all the maps in the project and
#              convert labels to annotation for each map

# import system modules

import arcpy

# Loop through the project, find all the maps, and
#   convert labels to annotation for each map,
#   using the name of the map as part of the annotation suffix 
project = arcpy.mp.ArcGISProject("D:\\data\\myproject.aprx")
for mp in project.listMaps():
    print("Converting labels to annotation for: " + mp.name)
    arcpy.cartography.ConvertLabelsToAnnotation(mp, 10000, 'D:/data/Cobourg.gdb', 
                                                'Anno_' + mp.name, 'MAXOF', 'ONLY_PLACED', 'REQUIRE_ID', 
                                                'STANDARD', '', '', 'AnnoLayers_' + mp.name)

Some more related questions can be found here and here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.