> Script Details
Export the data displayed in a mxd to a new folder.
report inappropriate content
Jul 16 2007
Status of work
ArcGIS - ArcView
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
The mxdexporter tool automates the copying of all the shapefiles, personal geodatabase feature classes, grids, tif, and jpg files in an mxd project to a new folder.
This tool contains a VB scripted tool and a python script. The VB script codes a button in ArcMap, which when executed, will create a text file that stores the layer file paths and names used by the mxd. Next, the python script reads the text file and creates copies of the layers into the same folder that contains the mxd document.
Outline of Steps
1. Install the WriteLayerPaths2txt.bas. (One time only)
2. Install the WriteLayerPaths2txt button in ArcMap (One time only)
3. Save your mxd (with relative paths) to a new empty folder.
4. Execute the WriteLayerPath2txt tool.
5. Run mxdexporter.py
6. The readmefirst document lists other potential problems.
7. Reset the data sources in the mxd to preserve the map symbology.
Hopefully a real programmer will see what I have done and code the WriteLayerPath2txt to handle this process with one button push. Until that time, feel free to write with "issues or problems."