Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know any python script to use for arcview to import a bookmark (saved as a .dat) that was created and saved externally using ArcMap? I tried with this script but without a result:

import arcpy
from arcpy import env

env.workspace = r"F:\Projects\Roni\abaloa"
for mxdname in arcpy.ListFiles("*.mxd"):
    print mxdname
    mxd = arcpy.mapping.MapDocument(r"F:\Projects\Roni\abaloa\\" + mxdname)
    df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    for bkmk in arcpy.mapping.ListBookmarks(mxd, 'Bookmark1', df):
        df.extent = bkmk.extent
 del mxd  

I've also searched all documentation and forums with no luck.

share|improve this question

As PolyGeo outlined, you cannot transfer bookmarks from one map document to another with arcpy. What you can do, however, is:

  1. You can list your bookmarks in a map document with arcpy.ListBookmarks function (you will get name and extent). The extent information can be used to create features which you can save into a feature class (at least something).

  2. You can use ArcObjects to create bookmarks based on the extent information you have obtained. See here and here to learn more.

share|improve this answer
Thanks, but I'm writing 'ןאי Python language, how can I change the code I wrote in order to be able to perform the operation – newGIS Jul 14 '14 at 6:09
With the current version of arcpy - you can't . – Alex Tereshenkov Jul 14 '14 at 6:35

The function that you tried i.e. LoadSettings (arcpy) will load Geoprocessing environment settings:

Loads environment settings from an environment settings file (text stored in an Extensible Markup Language [XML] schema).

but Bookmarks are stored with the properties of a Data Frame object and so will not be altered by that.

However, there is an existing ArcGIS Idea entitled Create Bookmark Toolbox that, if implemented, would deliver the functionality that you seek.

Consequently, I recommend that you add your vote to it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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