Questions tagged [arcpy]

A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

Filter by
Sorted by
Tagged with
3
votes
5answers
2k views

script for automated line drawing procedure for set of start and end points [closed]

A colleague conducted a field survey and recorded the start and end points of the transects with a GPS. These points have been imported to ArcMap 9.3 as 2 point layers. Both layers have a "transect ...
1
vote
1answer
741 views

Run a python script every time the page is changed in Data Driven Pages? (ArcGIS 10)

I'm setting up a Data Driven Pages mapbook mxd for a series of parking locations. I have dynamic text that updates according to the current map sheet, but I also have text that needs to update using a ...
1
vote
3answers
2k views

Running ArcPy script on unix/linux server?

I've written some python scrips that use the ArcPy module to do some pretty intensive processing. I'd like to be able to run these on the fast unix server we have in our department so that I don't ...
9
votes
2answers
3k views

Changing from layout view to data view using ArcPy?

Is there a way to change from layout view to data view using Python and ArcMap 10? I would prefer to do it using ArcPy.
1
vote
2answers
12k views

KeyboardInterrupt doesn't work when arcgisscripting module is loaded

The KeyboardInterrupt exception -- thrown when Ctrl-C, or Ctrl-Break on some machines, are pressed in a Python console window -- is commonly used to gracefully break out of long-process loops, ...
6
votes
3answers
2k views

Using arcpy.ExportMetadata_conversion?

I don't know if it is a bug or my lack of python skills, but I keep getting 'ERROR 000816 The tool is not valid' in my python script when I call ExportMetadata_conversion Initially, I was attempting ...
6
votes
5answers
2k views

Converting Avenue scripts/extensions from ArcView 3.x to ArcPy for ArcGIS Desktop?

As a side project, I'm looking into the effort required to (semi-) automate conversion from Avenue to Python, instead of keeping ArcView 3.x around to run them.
5
votes
2answers
8k views

Assertion Error when attempting arcpy.mapping.AddLayer

Whenever I attempt to use AddLayer it gives me: Runtime error <type 'exceptions.AssertionError'> This is what I've been using: arcpy.mapping.AddLayer(MainDF, r"\\GEOGDATA\campusmapping\...
1
vote
1answer
965 views

How to create a pop-up box if a condition is true in a table? (ArcMap 10)

I'm creating a script that will grab layout data from a table for the current Building Number of the current building my map series is on. It works fine, but I need it to pop up a window if multiple ...
6
votes
1answer
3k views

Changing text element font size using ArcPy?

I need my script to change the font size of a text element if the string is too long to fit in the title section of the map. I've looked into it using ArcPy, but haven't had any luck. Does anyone ...
19
votes
4answers
17k views

Using ArcPy to zoom to selected feature?

Is there a way to zoom to the extent of a selected feature using the ArcPy module in ArcGIS Desktop 10.
12
votes
2answers
8k views

Making button that calls Python script as command rather than script tool?

I believe that in Arc9.3, commands could be created using VBA scripts. To add a custom command, you would navigate to Customize > Toolbars > Customize... and click UIControls. However, UIControls is ...
1
vote
2answers
1k views

unique value symbolize layers from a lookup table

I need to create a large number of Arcmap layer files (v9.3 or 10), perhaps a hundred, from lookup tables. I don't have to set the symbol patch itself, that can be random, but I do need the value and ...
4
votes
2answers
2k views

Building Python script that exports to several output files using ArcGIS Desktop?

I'm trying to build a Python Script that will receive one feature layer that will be clipped by several adjacent grid squares (each in a different shapefile) and output several shapefiles. Now, I've ...
6
votes
2answers
5k views

Changing page layout from portrait to landscape using ArcPy with ArcMap?

I need my script to access the Page Orientation property of the current MXD, and switch it from portrait to landscape (or back). I've looked through the ArcGIS 10 arcpy and arcpy.mapping ...
16
votes
3answers
6k views

Using ArcPy to get layer symbology?

Since ArcGIS 10 comes with the ArcPy package, I'm wondering it is possible to use ArcPy functions to get Symbology (i.e color, width...) of a layer?
16
votes
7answers
8k views

Bulk field renaming in file geodatabase? [duplicate]

I have a file geodatabase with several hundred feature classes in it. Some feature classes have a field that got named incorrectly, and it got named "SCHEMA_FEATURECLASS_ENTITY" instead of just ...
17
votes
1answer
6k views

Self terminating Python script in ArcMap?

I have tried sys.exit, but it doesn't seem to work in ArcMap 10. Anyone know how to do it?
8
votes
5answers
2k views

Will there be a Python API for ArcGIS Server?

It seems like an obvious next step given the big push towards Python in ArcGIS Desktop at 10.0. Are there any limitations of Python compared to javascript, flex, etc that would prevent ESRI from ...
13
votes
4answers
13k views

Will ArcGIS Desktop support latest Python 2.x or Python 3.x versions?

I'm curious to know whether ArcGIS Desktop 10.0 will support newer versions of Python than 2.6. And for that matter newer versions of NumPy (ie, 1.4, 1.5 etc). I'm sure that this documentation is on ...
8
votes
0answers
1k views

Seeking training resources in Python as applied to geodatabase management? [duplicate]

I've taken ESRI database courses, which have been helpful to my work but I also need training in Python as applied to geodatabase management?
19
votes
7answers
4k views

Code-completing/auto-completing ArcPy scripts using Notepad++ (external editor)?

I have been scripting in Python for ArcGIS 10, and so far I have just been using Notepad++. I like how the Python command line interface code-completes arcpy functionality for you, showing you your ...
20
votes
6answers
8k views

Documentation for ArcPy site-package?

Has anyone found any informative documentation about Esri's ArcPy Python module?
3
votes
1answer
555 views

Accessing MPS Atlas from Python with ArcPy?

I'm having trouble finding documentation on accessing MPS Atlas features using python in ArcGIS 10. I need to be able to modify dataframe manager properties, swap map sheets, etc. Is it part of ...
1
vote
3answers
1k views

an arcgisscripting method for sanitizing a filename?

Is there an arcgisscripting method for sanitizing a filename to get rid of characters which Arcgis barfs on, the meek hyphen - for example?
5
votes
2answers
8k views

Resolving ImportError: No module named arcgisscripting?

I am trying to run an ArcGIS python script from Eclipse and get the following message: ImportError: No module named arcgisscripting I can run this in IDLE... any ideas?
3
votes
3answers
1k views

How to stop ArcGIS Python script printing warnings and other outputs to the console

I've written a Python script using arcgisscripting to do various processing steps on some data. I'm planning to run it from a stand-alone command-line window (ie. not within ArcGIS at all) and, as ...
14
votes
5answers
18k views

Changing feature class and field aliases in bulk using ArcPy?

I have over a hundred FCs, each with 10 or 20 attributes to add or change the aliases for, two or more times a year. Needless to say, this is not something I'm going to grunt my way through. How can I ...
10
votes
7answers
7k views

Getting raster image as array in Python with ArcGIS Desktop?

When starting to work with Python and ArcGIS 9.3, I assumed there would be a simple way to get a raster image into a Python array so that I can manipulate it before storing it back as another raster ...
11
votes
2answers
955 views

Can ArcGIS and OSGeo4W share the same python install? [duplicate]

I don't like unnecessary duplication. Is it possible to install python only once and have both ArcGIS and OSGeo4W using it?