Select to view content in your preferred language

extracting data from an mxd using ModelBuilder

2029
3
01-17-2012 10:04 AM
ScottKelly
Emerging Contributor
Hi
     I am trying to use ModelBuilder to automate a process that I do to create a personal geodatabase for our field laptops. In ArcToolBox I can't find the "Extract Data" button that is in the Distributed Geodatabase toolbar. Does any one know how to extract the layers in an MXD to a personal geodatabase using modelbuilder? Below are the steps that I am trying to automate using modelbuilder.
Steps to CreatingNew Field Laptop Data
1. Open \\srvch-gisapp1\ArcGIS MXDs\ IAMS\Water Utilities\ForExtractionToLaptopRevised.mxd
2. Extract data in map to: \\srv-gisapptier\CityWorks\downloads as gisdata_date.mdb (example: gisdata11_20_2011.mdb)
3. Copy .loc files to from (old) geodatabase to gisdata_date.mdb
4. Rename gisdata.mdb to gisdatabackup
5. Rename gisdata_date.mdb to gisdata.mdb
6. Zip the new gisdata.mdb file. Hint right click and �??Send to�?� zip file
Tags (2)
0 Kudos
3 Replies
EdwardEllis
Deactivated User
I hate coming across posts with not even one attempt at an answer.

Consolidate Map Geoprocessing tool would do part of what you're wanting to accomplish and could easily be added to your model in model builder.
0 Kudos
MichaelVolz
Esteemed Contributor
Try this snippet of code from exporting the following tool from ModelBuilder

Server Tools->Data Extraction->Extract Data Task

# Import arcpy module
import arcpy


# Local variables:
Area_of_Interest = "in_memory\\{CD30411C-DFE5-4ACF-A010-0928C2A4B66C}"
Output_Zip_File = "%scratchworkspace%\\output.zip"

# Process: Extract Data Task
arcpy.ExtractDataTask_server("", Area_of_Interest, "File Geodatabase - GDB - .gdb", "ESRI GRID - GRID", Output_Zip_File)
0 Kudos
JustinConnerWR
Frequent Contributor

If you are attempting to extract data from a geodata service into a geodatabase, the relevant Extract Data Tool from the Distributed Geodatabase toolbar is apparently only available for automation with a licensed Production Mapping extension - see Extract Data Tool/Wizard not available in arcpy.  If the service contains data from a versioned SDE geodatabase, you can create a replica without the Production Mapping extension.

0 Kudos