Annotation with no reference scale

343
1
01-03-2023 08:12 AM
IanLadd
New Contributor III

Hello!

I have a layout with 20 map frames at different reference scales all sourced from one map. I'd like to convert my labels to annotations, however when I do that, the annotation layer sets it's own reference scale. I'd like to simply convert my labels to annotations without a reference scale. 

I saw the Tile Labels to annotation tool, but I don't have a polygon index layer. 

Any help would be great! 

 

- Ian

0 Kudos
1 Reply
JesseWickizer
Esri Contributor

If you want to use the Tiled Labels To Annotation tool but don't have a polygon index layer, you could create one using Python that includes the map scales and names of each of your map frames:

import arcpy
from arcpy import env

# Set the output location and name of the output feature class
# The Geodatabase must already exist
env.workspace = "C:/temp/test_project/data.gdb"
# Name for the new feature class that will be created in the gdb
outputFcName = "MapExtents"
outputFeatureClass = env.workspace + "/" + outputFcName

aprx = arcpy.mp.ArcGISProject("CURRENT")
layout = aprx.listLayouts()[0]
mapFrames = layout.listElements("MAPFRAME_ELEMENT")

# Create new feature class to hold the output
arcpy.CreateFeatureclass_management(env.workspace, outputFcName, "POLYGON", "", "DISABLED", "DISABLED", "WGS_1984_Web_Mercator_Auxiliary_Sphere")

# Add fields to store name and scale attributes
arcpy.management.AddField(outputFeatureClass, "MapFrameName", "TEXT", 0, 0, 100)
arcpy.management.AddField(outputFeatureClass, "MapScale", "DOUBLE", None, None)

# An array to store the extent details of each map frame
outputFeatures = []
# Loop through each map frame in the layout and store the map frame extent details
for frame in mapFrames:
	# print(frame.name + "\t" +str(frame.camera.scale))
	extent = frame.camera.getExtent()
	outputFeatures.append((extent.polygon, frame.name, frame.camera.scale))

insertCursor = arcpy.da.InsertCursor(outputFeatureClass, ['SHAPE@', "MapFrameName", "MapScale"])
for output in outputFeatures:
	insertCursor.insertRow(output)
del insertCursor

Then run the Tiled Labels To Annotation tool with these parameters:

  • Polygon Index Layer: the resulting MapExtents layer from the script
  • Tile ID Field: MapFrameName (field that was created in the MapExtents layer)
  • Reference Scale Field: MapScale (field that was created in the MapExtents layer)

The result of the tool will be new annotation layers with their reference scales added to the names, and each of them added to a separate group like this:

JesseWickizer_0-1672943252433.png

If some of your map frames overlap other map frames you could have label conflicts so you could set the visibility ranges on GroupAnno### layers so they only display at the intended scale.

JesseWickizer_1-1672943357660.png

 

 

Another option to consider is to Convert Labels To Graphics for the area covering all of your map frames, then change the graphics layers' reference scales to None. While annotation requires a reference scale, graphics do not. If some of your map frames overlap you may have trouble placing the labels where you want because all map frames share the same map and therefore same set of graphics. If this is an issue, the tiled annotation may be better. 

JesseWickizer_2-1672943442204.png

 

0 Kudos