A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

5
votes
1answer
755 views

arcpy.mapping.ListLayoutElements() takes longer in a tool than in ArcMap

Has anyone else noticed that accessing elements from arcpy.mapping.ListLayoutElements() through a tool script takes longer than within ArcMap? Whether using a specific name, wildcard or nothing, the ...
4
votes
1answer
661 views

Can I change the font type in all Text_Elements in a page?

I want to change all the font styles in a number of mxd's from "Lucinda Sans" or whatever the current one is to "Arial" without changing the font size. I wrote a simple script to find/replace text ...
2
votes
1answer
194 views

Out of Range error when creating thumbnails of MXDs

I am tryting to create thumbnails of all the mxd's in a directory but no mater how high I set the value of the "While" loop it gives me an "Index out of range" error... Also can I get it to look at ...
2
votes
3answers
2k views

Does ArcGIS 10 have a Geoprocessor Programming Model by using Arcpy?

Does ArcGIS 10 have a Geoprocessor Programming Model by using Arcpy? is it possible to use ArcGIS 9.3 Geoprocessor Programming Model within ArcGIS 10?
1
vote
1answer
347 views

Opening ArcCatalog to FGDB causes application to fall over

I have some python scripts I have written to create a lot of objects. I write these, in code, to a couple of FGDB's. If I happen to open ArcCatalog in one of these FGDB's, the application falls ...
1
vote
1answer
497 views

Create shape file of bookmark extents and/or automatically print bookmark extents to pdf

Is it possible to export the extents of all bookmarks in an active map document to a shape file containing the polygons of the shape and/or to automate the print to pdf of all the bookmark extents. ...
1
vote
1answer
2k views

Replace text using python in active map view

I would like to update misc text in an active map window but can't seem to crack the code and I found some presentations that mention it can be done but the full code isn't there. The following is ...
3
votes
2answers
4k views

Change Symbology of layers from within ArcMap

Cheers, In an active Arc Map session - I want to change the symbology of a layer which is repeated multiple times in the mxd. Can I do this? The basic code I have for getting the layers is below. ...
6
votes
1answer
628 views

ArcGIS 10 Linux experience

We have ArcGIS 10 installed on a nice clean Linux box. We have developed scripts to run on the Windows desktop development machines, and modified them to run on Linux. Now, if we run the scripts on ...
2
votes
1answer
1k views

How do I insert a DATAFRAME_ELEMENT value into a dynamically generated shape file containing its extent?

This is for ArcGIS 10, Python 2.65. I have code which captures the extent of dataframes within all mxd's in a directory. I also want it to add the dataframe name, scale and the name of the mxd it ...
4
votes
1answer
297 views

ArcPy or FME for adding history to an object?

I have a very specific problem and I'm looking for a solution for it. I need to add some sort of history to an object. The history will be stored like this: begin_date end_date previous_id Suppose ...
2
votes
1answer
805 views

Using multivalue output parameter with ArcPy?

How can I use a multivalue output parameter with ArcPy? Please give an example.
6
votes
1answer
472 views

Arcpy hanging on Linux

I am having issues getting arcpy to run correctly on Linux Red Hat. I solved some earlier problems which appeared to be related to permissions on the init_server file. Now that si resolved, when I ...
1
vote
3answers
715 views

Automating capture of Extent from multiple mxds with multiple dataframes

I want to create a single shape file from multiple mxd's that have multiple frame sets with different extents in them. I have found/started a script to do this (attached) but can't figure out how to ...
0
votes
6answers
3k views

batch buffer with python in arcgis 10

Hi friends: i have some feature class(7 feature classes) and I want to batch buffer in ArcGIS 10 . I don't know how can I buffer at once. Please help me. sincerely
5
votes
1answer
2k views

Is there a way to delete a raster using arcpy / ArcGIS 10.0?

I'm trying to find a way to delete a raster dataset (in any format) using arcpy. As it is now I have been writing custom functions for each file type (eg, delete directory and pyramids for grids, ...
2
votes
1answer
160 views

Does arcpy.AggregatePoints_cartography create multiple polygons?

Does this function allow you to put in an array of points, which may, or may not, be representative of many polygons, and create many polygons from it, or just the one, linked?
2
votes
0answers
577 views

Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this: stdevGrid = ...
7
votes
2answers
3k views

Modify raster layer display and symbology properties programmatically with arcpy or ArcObjects

I have over 1500 NITF files that I need to be able to modify the layer display and symbology of programmatically from within ArcMap. I need to set the properties outlined in red below: I've looked ...
4
votes
1answer
5k views

Thiessen Polygon delineation within a Feature

I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent. The output should be inclusive to the feature. The output I receive now is the rectangular area ...
4
votes
4answers
642 views

Unable to save selected layer by attribute for ArcGIS Geoprocessing

I am troubles using the SelectLayerByAttribute() function for arcgis geoprocessing. I have a layer and I want to select everything that matches on a particular attribute. I call MakeFeatureLayer() ...
0
votes
1answer
60 views

Adding data at runtime into dataframes

I am trying to create an empty MXD to act as a template. I will have three dataframes for maps, each holding a different object from ArcSDE (1 raster object and 2 features). I know how to query all ...
2
votes
1answer
575 views

Is there a way to set a mask(halo) for labels in a python script?

I currently am writing a python script and using a lot of the arcpy mapping module functionality. I have been using the LabelClass of the arcpy mapping module to automate the display of labels with my ...
5
votes
2answers
2k views

Installing ArcGIS 10 with Python(x,y)

EDIT 10/20/2011: The problem I was having below was caused by trying to install Python(x,y) after ArcGIS 10. I got a new machine yesterday and instructed IT to install Python(x,y) 2.6.5.3 (has ...
27
votes
4answers
4k views

Performance of ArcGISScripting and large spatial data sets

I am currently writing a python script using the arcgisscripting module to process a reasonably large data set (~10,000 records in total) normalised over a small number of tables, 8 in total. The ...
2
votes
2answers
559 views

From a script tool using ArcPy, can I store a point object in a BLOB field and retrieve that point later?

I am trying to write an ArcPy script tool that will store a point object in a BLOB field that I have created. I don't know if that is even possible. If it is, how do I do it, and how can I then ...
9
votes
2answers
2k views

Is there a ArcGIS python script development API?

I'm a somewhat experienced software engineer new to the GIS world. I started working on a GIS project that supports ArcGIS 9.3 and 10.0 and looking through existing code it looks like the main ...
3
votes
2answers
3k views

Can you create labels based on an attribute field in a shapefile with Arcpy?

I was curious if anyone knew how to access the ArcGIS label engine with arcpy? I want to be able to label point features on my map in a python loop.
4
votes
1answer
823 views

occasionally empty search cursor looping through a raster list with arcpy

I'm looping through a raster list, to export cell counts (from "Count" field in the table) to a text file, I'm only interested in cases where the field "Value" = 1, so I have included this in my ...
5
votes
2answers
2k views

How do I calculate a weighted centroid with respect to a raster, e.g. population weighted centroid

In ArcGIS 10.0, how do I calculate the weighted centroid of a collection of polygons, where I want the weight to be a raster layer. In particular I am using a raster of population counts and would ...
3
votes
1answer
2k views

Can you add dynamic text from a count of features in a layer with ArcGIS 10 ArcPy.mapping?

I am new to writing scripts, and I am trying to make a map series using ArcPy.mapping and data driven map pages. I would like to put some text on the map that updates for each map in the series ...
6
votes
2answers
2k views

Is it possible to access ArcGIS's table operations “Summarize…” and “Statistics…” in python?

ArcGIS has a few nifty table tools, including Summarize and Statistics. Is there a way to access them through arcpy, or will I have to hack my own methods via math and lists?
6
votes
1answer
1k views

ArcObjects C#: Create Random Points fails with ERROR 999999: Error executing function

I am having trouble running some ArcObjects C# code that calls create random points. I would not be doing this in ArcObjects, but I am suffering with the same issue using Arcpy as seen here: ...
5
votes
1answer
6k views

How to access data from a selected feature in ArcGIS 10?

First to describe my problem as I see it. I've been asked to design a tool that will take a selected features attributes and copy it out to an output table, with each successive selection and ...
4
votes
3answers
2k views

Need to create a collection of polygons from a collection of points

I have a set of points, which are spread over a wide geographical area. I need to be able to create a set of polygons which best represent the clustered points. In parts, some points may simply lie ...
1
vote
2answers
2k views

How can I insert new records to an ArcSDE feature class from a view in ArcSDE

I am wondering how I can both insert new records from a view to a feature class and update data that may be newer in the view than in the feature class. I have been fumbling around in modelbuilder and ...
7
votes
2answers
833 views

Process a raster with multiple geoprocessing tools in arcgis 10 using python - flow between processes

I'm writing a short python script that includes processing rasters with different geoprocessing tools in ArcGis 10, for example, the three processes below, is this best way to use multiple tools ...
9
votes
2answers
8k views

Change data source path in .LYR files in Arcgis 10

How can one change the source data paths for every layer file in folder X using arcpy? I've followed Updating and fixing data sources with arcpy.mapping as best I can, yet all I get is an unhelpful ...
3
votes
2answers
1k views

Is it possible to get arcpy on 9.3* or Qgis? Or maybe some of the functions?

If this isn't possible what would be the closest equivalent open source? Could parts of the module be ported to work on 9.3 or QGIS? I'm not sure if this would infringe on the license porting for 9.3. ...
4
votes
2answers
907 views

Resequencing Legend Items in Python

I create various layers programmically with Python in ArcMap 10. I can adjust how the layers are sequenced using the arcpy.mapping.MoveLayer command. But I want to have the legend reflect a different ...
35
votes
7answers
5k views

How can I effectively debug arcpy Python scripts?

I have written many Python scripts using arcpy in ArcGIS 10, and so far my only means of debugging is restricted to printing messages to the geoprocessing results window using arcpy.AddMessage(). Are ...
2
votes
2answers
2k views

How to recode field values based on field contents?

Is there a convenient (or even effective) method for recoding field values using the field calculator or standalone python script? In this case, I am given several unique strings to identify a type of ...
2
votes
1answer
340 views

stratigraphic ranking with field calculator?

I would like to populate a feature class float attribute with a numerical ranking of a text attribute of a geologic map. I have a field named [sheet_unit] with strings such as "H10, Q" and "J10, Pl" ...
7
votes
4answers
5k views

Avoiding import arcpy error (RuntimeError: NotInitialized) when using IDLE?

ArcGIS Version: ArcGIS 10, Python 2.6.5 Machine: Windows 7 64bit (Intel) I'm receiving the following error when importing arcpy using the the IDLE (gui and cmd prompt) and when using pythonwin. I ...
5
votes
2answers
2k views

Cannot get rid of lock on file geodatabase and feature class created in Python script

I have a python script, (for ArcGIS 10), that creates a new file geodatabase, creates a new feature class in that file geodatabase and then reads data from an SDE feature class to populate the new ...
8
votes
5answers
6k views

Remove feature layer using ArcPy script?

I have an ArcPy based script where I'm trying to intersect two layers where one layer must have its centroid in the other layer. Since I need to know that one layer (feature_layer below) includes ...
4
votes
4answers
615 views

Compressing map algebra outputs from ArcPy

When creating a raster map algebra output, is it possible to set its compression? I'm creating a model which generates many hundreds of rasters, and currently each is being stored without any ...
1
vote
1answer
593 views

user select fields to be deleted in a feature class

How do I make the script below accept parameter arguments correctly in ArcGIS 10? I added it to a toolbox as a script, created parameter called Fields to be Deleted: and type as Field, but when I ...
3
votes
2answers
573 views

Enabling time aware layers using arcpy

Is it possible to enable time aware on a layer programmatically? I can add a time-enabled layer to a non-time aware data frame as shown here: ...
14
votes
3answers
8k views

Listing all feature classes in File Geodatabase, including within feature datasets?

From python how can I build a list of all feature classes in a file geodatabase (*.gdb), including inside feature datasets? The standard example only lists feature classes at the top level of the ...