2
votes
0answers
28 views

Validating whether PDF file Uploaded as part of Geoprocessing Service of ArcGIS for Server?

I'm developing a Python Script that will be a Geoprocessing Service in ArcGIS Server. The Script has a Button for Users to OPTIONALLY Upload a PDF. If the PDF is Uploaded it gets inserted into the ...
2
votes
1answer
25 views

Is there a a way to add a topology dataset to an mxd with arcpy?

I have a script that identifies certain layers from a folder containing several geodatabases. Part of the scripts purposes, or intended purpose is to have it add a topology dataset to the dataframe. ...
1
vote
1answer
41 views

Add annotation feature class to mxd with arcpy

From what I have researched, I'm pretty sure the answer is NO, but I want to make sure no one has found a work-around. Annotation feature classes in personal geodatabases need to be added to mxds. ...
1
vote
1answer
52 views

Conditional drop-down menu list in a python script tool

I have created a script tool from some python code, and in a previous question, I learned how to enable a drop-down list in this tool by changing the Validation code - see link and image below: ...
2
votes
1answer
58 views

Is it possible to create a data frame graphic using arcpy?

I'm interacting with an MXD using arcpy, and wish to create a graphic within a data frame - as with the Draw toolbar when working manually. The GraphicElement page says... The GraphicElement ...
2
votes
1answer
63 views

How do I rename rasters in an mxd by using my csv?

I have the following data in a csv: RasterName First name Raster 1 Aaron Raster 1 Paul Raster 2 Bryan Raster 3 Cranston Raster 3 Vince I have added these ...
1
vote
0answers
132 views

Copy Features giving ERROR 000210: Cannot create output in ArcPy?

I have an issue where I'm trying to save separate feature classes for each route in an already solved closest facility problem, and one seemingly arbitrary route won't save. I tried to look at the ...
2
votes
1answer
42 views

Batch create maps using arcpy.mapping

I'm trying to create .mxd and PDF outputs for a series of feature classes in an SDE. I'll need to match 2 feature classes (one original, one buffered) in the SDE based on similar file names. The ...
1
vote
1answer
39 views

sum of raster counts

I'm trying to get the sum of "counts" in a raster. I have the code below which can successfully read the counts of each row in raster attribute and stores the counts in a list provided below. ...
2
votes
1answer
65 views

Using ArcPy to ungroup group layer in MXD?

I am looking for a way to ungroup a group layer using arcpy... (instead of having to open the mxd and right-click on the layer to choose "Ungroup"...) mxd = arcpy.mapping.MapDocument(pathToMyMxd) df ...
0
votes
0answers
37 views

Using arcpy to enable layer masking (Advanced Drawing Options)

I am looking for a way to enable and change layer masking (under Advanced Drawing Options) with arcpy... it seems you can do this if you have the Production Mapping extension, but I do not have it... ...
2
votes
1answer
47 views

Flagging when point feature(s) covered by tables (made as graphics) using ArcPy?

I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common! I've made some tables (as graphics) using ArcPy and the technique ...
1
vote
1answer
89 views

Error with data frame in python script

I'm running a python script from arccatalog and it works, however, I am trying to add layers to an mxd and need to declare the data frame. I keep getting this error message. type ...
0
votes
1answer
70 views

replace data source for all layers that point to shapefile

Hi I'm trying to do something quite simple but its not working. I want my python script to change all of the layers that point to the same datasource (a point shapefile) to another point shapefile. ...
0
votes
1answer
79 views

AddLayer method failing when script in ArcToolbox is run from ArcCatalog

I need a 2nd set of eyes to do a sanity check, as I am not been able to figure out why a script that runs fine in pywin, does not run properly as a tool in a toolbox. Below is the script that runs in ...
0
votes
1answer
45 views

How to restrict read only *.mxd file?

I have an *.mxd file and I don't want to save any edits to it after each session. Is there a way in 'arcpy' or python in general to restrict edit of *.mxd file? Any suggestions would be appreciative.
2
votes
2answers
269 views

How to generate dynamic legend using ArcPy?

I used this example to produce printing service. As the result I get map with too many elements in the legend. Is it possible ti show classes that are visible in the current map extent using python ...
0
votes
0answers
79 views

arcpy.mapping.Export creates some labels but not others

I've created a simple python toolbox (pyt) to export map layouts to multiple formats. My problem is that some labels which are defined in the layout are exported, but others are not. For example ...
0
votes
1answer
84 views

Listing Printer names in a Python Toolbox in Arcgis 10.1?

Here's my code for my third parameter in my Python Toolbox. When I run the toolbox and look at the list of printers, it only shows one of them. My print command of 'printerName' lists all of them in ...
1
vote
3answers
203 views

Assigning UNC Path to arcpy.env.workspace

For some reason my python script crashes ever time it reaches the following code which attempts to assign a unc path as my workspace. Can any of you please help me solve this problem? Also, I'm not ...
1
vote
0answers
977 views

How to use replaceDataSource to replace data source for multiple layers?

I appear to be having difficulty with using 'replaceDataSource'. ESRI has atrocious documentation on updating and fixing data sources, and almost everything I have read on the subject is almost what I ...
0
votes
1answer
156 views

Is it possible to get full path for broken data source to repair broken data link?

This question links back to an old question of mine: Convert shapefiles in nested folder to geodatabase I am attempting to find a permanent solution to fixing the broken maps, and in such a way that ...
0
votes
1answer
168 views

How do I edit a Direct Connection Workspace using arcpy.da.Editor?

How to start editor to edit version data for ArcGIS 10.1 direct connection. I tried as given below code but it is throwing an error "Operation only allowed by the owner of the version [SDE.DEFAULT]". ...
0
votes
2answers
346 views

How to List Tables from current map document (mxd)?

We have many maps containing Feature Classes and Tables in a Personal Geodatabase that need their information updated. Is there a function to List Tables from the current map document like mxd = ...
2
votes
1answer
88 views

Why is arcpy.mapping.ExportToPDF losing layer symbology?

When exporting a map it does not export the symbology within the data frame. I am using the code snippet below. >>> myMap = arcpy.mapping.MapDocument("C:/USERS/NISUSER/DESKTOP/mxd_map.mxd") ...
1
vote
0answers
21 views

Fix broken SDE layers with Arcpy - unexpected error [duplicate]

We are in the middle of our ArcGIS 9.3 to 10.1 migration project and we have a lot of custom map documents (from different users) that among others, point to our current 9.3 SDE database. After our ...
3
votes
2answers
227 views

How to change the style of the north arrow from “ESRI North 4” to “ESRI North 1”?

I have a Python assignment where I have to write a script to change the style of the north arrow from “ESRI North 4” to “ESRI North 1”. I wrote the following code: import arcpy mxd = ...
3
votes
1answer
458 views

layer.visible command not working in arcpy.mapping module

I am using the arcpy.mapping module for the first time, and the lyr.visible command is not working as it should (or I am not using it as I should). I have a list that contains the the layer names of ...
4
votes
1answer
652 views

Managing symbology in Feature Classes

I'm using an enterprise db to store my data and I'm writing a python tool that allows me to interact with that data in ArcMap. However, all my layers someone have "OTHER" for the symbologyType (not ...
1
vote
1answer
72 views

Weird Error when setting the source path in the “PICTURE_ELEMENT”

I am trying to set the sourceImage to a tiff file using this code: m=1 pic = arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT" , str(m))[0] pic.sourceImage = ...
1
vote
1answer
175 views

ARCGIS10: updatelayer results in error - LayerObject: Get attribute renderer does not exist

I'm quite new in using python in Arcgis 10. I wanted to use the symbology of a geostatistical layer in the TOC in another geostatistical layer in the TOC. Therefore, one should use ...
1
vote
1answer
807 views

How to use CURRENT map document in Python tool?

I am attempting to use this code in a tool that I am working on: mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] XMIN = df.extent.XMin YMIN = df.extent.YMin XMAX ...
3
votes
1answer
1k views

How to save currently opened mxd and changes using ArcPy and Python?

Here is what I have so far... import arcpy import arcpy.mapping as map mxd = map.MapDocument() mxd.save() And yes I know that map.MapDocument requires an argument, but I want it to automatically ...
1
vote
1answer
111 views

How to Average neighboring county data and store in original?

I have data for several rain stations, i have averaged the data and given each county a value. Some counties have null values and I would like to pull the data from the all the bordering counties and ...
1
vote
1answer
541 views

arcpy.mapping Graduated Colors Symbology

I'm trying to figure out how to apply graduated color symbology to a feature class by using arcpy.mapping in ArcMap 10.1. To start, a script runs and a feature class is added to a map document, no ...
2
votes
0answers
47 views

Difficulty in running the script

I have developed a script tool for adding a layer in the current map document. It did not work.. The message is "Completed script addlayer...". But there were no layers added in the TOC. Another issue ...
1
vote
1answer
139 views

How to query and display layer using ArcGIS Python script tool? [closed]

I have database which contains point shapefiles and raster files for 3 species. My aim is to develop a script tool that should have a search tab to enter the species name. also, a check box to select ...
1
vote
0answers
187 views

arcpy ArcGIS Server

Could someone please help me by giving me an example on how to make/connect/Add ArcGIS Server connection via python/arcpy? Thank you in advance. I'm using ArcMap 10.0 I desire to "Use GIS Services" ...
2
votes
0answers
214 views

Can not get text element to update?

I can not get text element to update? Text ELement has been added "Subdivision" Still not updating?.. class ButtonClass2(object): """Implementation for FemaMapper_addin.button (Button)""" def ...
2
votes
1answer
521 views

How to use arcpy.mapping to batch export layer to KML?

I am trying to export map layers from an MXD to KML using arcpy with the following code: import arcpy, os, sys, traceback arcpy.env.overwriteOutput = True mxd = ...
0
votes
1answer
356 views

How to add a graphic table element in Python without Production Mapping extension?

I'd like to add a table in the Map Layout that includes only items visible at the current extent of the dataset. I know that the Production Mapping Extension lets you insert a Graphic Table Element ...
3
votes
0answers
101 views

Why aren't a layer's serviceProperties exposed if the data source is broken? [closed]

In ArcObjects you can get the service properties of a map layer by looking at its IWorkspaceName.ConnectionProperties property set, even if the layer is currently invalid due to a broken connection. ...
2
votes
1answer
64 views

create folder with random number for each session using arcpy

I am processing data and it is required to have same name of outputs [standard names] for different geographical regions. Therefore it is necessary to save outputs in different folders each time. Is ...
5
votes
1answer
1k views

How to update shapefile data source in multiple dataframes and mxds using lyr.replaceDataSource and Python dictionary?

After reorganizing the file structure for some of our GIS base data files I need a script to update the data sources for ~ 100 shapefiles in about 50 mxd files. Some of the mxds have multiple data ...
1
vote
1answer
231 views

Removing/adding values in symbology window with arcpy

I'm using arcmap 10.1 and have one shp with many polygons with different typeID. I want to make a serie of maps showing each typeID on an individual map. Since I have many typeIDs I want to use arcpy. ...
4
votes
1answer
1k views

Problem getting the arcpy mapping module to export a layout view map

I'm using the arcpy mapping module to create a series of images and am having trouble exporting a map document to PNG in layout view; I can only get the script to export the data frame view. I've seen ...
2
votes
1answer
926 views

ArcPy: Using lblclass expression to change font style and color

I´m trying to label features of a dataset using ArcPy and the lblclass function. While commands like "VBNewline" and "Round" work pretty well, I´m not able to change colors or font style. An ...
2
votes
1answer
560 views

How to add new data frame(s) to map using ArcPy?

I want to add a 2nd data frame to an existing "*.mxd" file. Right now, i see option to add layers and edit properties of "CURRENT" data frame but could not figure out how to add a new one and export ...