Parece que estás lejos de estar solo en querer esto como una funcionalidad lista para usar. Hay al menos tres ideas de ArcGIS a las que le recomendaría que agregue su nombre:
Mientras tanto, si alguien se inspira para escribir una herramienta BookMarks To Feature Class , entonces estoy seguro de que su salida se usará bien como una Clase de entidad de índice para páginas controladas por datos.
Terminé haciendo esto como un ejercicio de capacitación basado en gran medida en un código de muestra de la Ayuda en línea de ArcGIS para ListBookmarks (arcpy.mapping).
import arcpy
# The map with the bookmarks
mxd = arcpy.mapping.MapDocument(r"C:\polygeo\Maps\Bookmarks.mxd")
# Make sure that Training.gdb exists
fileGDBFolder = (r"C:\polygeo")
fileGDBName = ("Training.gdb")
fileGDB = fileGDBFolder + "\\" + fileGDBName
if not arcpy.Exists(fileGDB):
arcpy.CreateFileGDB_management(fileGDBFolder, fileGDBName)
# The output feature class to be created -
# This feature class will store the bookmarks as features
fcName = "Bookmarks"
outFC = fileGDB + "\\" + fcName
# Create new feature class and add a "Name" field to store the
# bookmark name. Provide it with the same Spatial reference as
# the data frame in which the bookmarks of the map are stored
if arcpy.Exists(outFC):
arcpy.Delete_management(outFC)
arcpy.CreateFeatureclass_management(fileGDB,
fcName,
"POLYGON",
spatial_reference=arcpy.SpatialReference(
"Geocentric Datum of Australia 1994"))
arcpy.AddField_management(outFC, "Name", "TEXT", "", "", 50)
# Use arcpy.mapping.ListBookmarks to read bookmark corners and names,
# then arcpy.da.InsertCursor to write arrays of Point geometries from
# that can be written as Polygon geometries to the Shape field of the
# new feature class (with their names).
cur = arcpy.da.InsertCursor(outFC, ["SHAPE@", "Name"])
array = arcpy.Array()
for bkmk in arcpy.mapping.ListBookmarks(mxd):
array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMin))
array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMax))
array.add(arcpy.Point(bkmk.extent.XMax, bkmk.extent.YMax))
array.add(arcpy.Point(bkmk.extent.XMax, bkmk.extent.YMin))
# To close the polygon, add the first point again
array.add(arcpy.Point(bkmk.extent.XMin, bkmk.extent.YMin))
cur.insertRow([arcpy.Polygon(array), bkmk.name])
array.removeAll()
del bkmk,array,cur,mxd
print "Bookmarks feature class has been created in " + fileGDB