-1
votes
2answers
109 views

Export MXDs files to PDFs using Python [closed]

I'm trying to write a python script that will export multiple MXDs to individual PDFs while using a feature class field to rename the pdfs (this can be an optional field, if not check it can copy the ...
0
votes
1answer
102 views

How to extract list of layers in MXD using ArcGIS Desktop 9.3.1 and Python 2.5?

I have been trying to extract a list of all the layers in my mxd (Arc9.3.1), using Python 2.5. If I could have the source of the layers too that would be even better... But as long as I can get a list ...
0
votes
1answer
195 views

Python Error while Publishing mxd ArcGIS 10.1

Hi I was in the process of publishing my mxd , I had reached till the analysis step where I encontered the error at staging the service. Before this below mentioned code I had created a connection ags ...
0
votes
1answer
192 views

How to export multiple MXDs to PNG without using VBA?

Okay, so I can feel that I am so close to solving this issue with the help of Jason (below) but I have modified to use as a script. The GetParameterAsText returns the following error when trying to ...
5
votes
3answers
162 views

Do Label Expressions Slow Down Drawing Speed?

Further to my earlier question about using different fonts on the same PC, I am wondering if label expressions would slow down drawing speed for a MXD? Here is my label expression: def FindLabel ( ...
2
votes
1answer
149 views

Programmitcally Change Text Font for all Labels on MXD

I'd like to know if there is a way to change the text font for all layers and all label classes within a layer on a MXD. I use a font not often found on all computers for created maps. I love the ...
1
vote
3answers
230 views

How to get index number of list item using Python?

this gives me a list of all 55 layers in my mxd import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0] for lyr in arcpy.mapping.ListLayers(mxd, ...
4
votes
1answer
198 views

Python - ArcMap: Fastest method to loop over Mxd's

I am attempting to find the fastest method for looping over multiple map documents while keeping memory resources down. I'm running this script outside of Arcmap 10. I have 5 map documents which are ...
1
vote
1answer
209 views

Change coordinate system in multiple MXDs ArcGIS 9.3 using Python

I have to loop through some folders which may contain *.mxd files and change their coordinate system. I already found this piece of Python which should do the trick for ArcGIS 10.x (from here): ...
3
votes
1answer
113 views

How to add Oracle database connection to AnalyzeforMSD script?

I use this script right now: import os, arcpy directory = r"C:\Project" for root, dirs, files in os.walk(directory): for myFile in files: fileExt = os.path.splitext(myFile)[1] if (fileExt ...
2
votes
1answer
352 views

How to access all mxd files in a folder?

I'm a beginner to Python and am trying to figure out how I can access several mxds in a folder. For example, when I want to use the AnalyzeforMSD function in ArcGIS: import arcpy mxd = ...
0
votes
1answer
765 views

Find and Replace data source script

The following script is supposed to find and replace all shapefiles in a mxd (that exist in the folder) to the new SDE data source. No errors when running the script however, when I open the MXD in ...
1
vote
1answer
157 views

How to programatically replace ArcGIS Online image with new imagery in mxd's?

I have many mxds that previously used ArcGIS Online Bing imagery. I want to replace those with newly purchased imagery. I know I need to use the arcpy.mapping.MapDocument module to do this though not ...
1
vote
2answers
199 views

What is the difference between Geoprocessing Map object vs. MapDocument object in Python

I have the following code: mxd["C1"] = arcpy.mapping.MapDocument(os.path.join(fRoot, filename)) mxd["C2"] = [arcpy.mapping.MapDocument(os.path.join(fRoot, filename))] C1 creates a geoprocessing Map ...
2
votes
1answer
275 views

How can I use Python to save several MXDs within the same script?

I have a program (720 lines of code) that runs multiple tasks on Arcmap .mxd files. Such as update layers, update text, add layers, etc. Within my program I have multiple "mxd.save()" instances. All ...
3
votes
1answer
203 views

How to clip a Oracle query layer directly in a Python script?

I have a query layer directly running from ORACLE database in a MXD. I want to clip this layer with a layer being created in another MXD in a Python based tool. My question is to do this clip ...
4
votes
1answer
890 views

Move .SHP from .MXD to gdb [duplicate]

Possible Duplicate: How to move SHP to gdb with ArcView license? Let's cut it short, I have numerous mxd with layer coming from .SHP and various servers WMS that I need to move to a gdb. ...
1
vote
1answer
1k views

Use ArcPy to rename MXD layers

I have a MXD with some layers that have parentheses in them. I'd like to rename them via script. Is this a valid approach? import re map = arcpy.mapping.MapDocument("CURRENT") layers = ...
2
votes
4answers
2k views

How to enumerate ArcGIS Server 10 map services with ArcPy

I need to connect to ArcGIS server with ArcPy and enumerate over map services. I need to: Loop through each ArcGIS server map service Stop/Start the service Get the service source document (MXD/MSD) ...
4
votes
2answers
601 views

arcgis 10, python update raster of mxd file

i wanted to update the raster file in a mxd file using python. for example, i created a.mxd which contains b.tif file in it. now, i obtained c.tif and want to update the a.mxd, i.e. want to delete ...
18
votes
4answers
1k views

Run a Python Script when opening an MXD?

Can anyone tell me how to accomplish this? I want a Python script to run on opening the MXD which would pull an excel worksheet into a GDB and refresh the map. I only want this to happen in this ...