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

learn more… | top users | synonyms (1)

0
votes
0answers
149 views

How to enable user to specify field mappings from a table joined to a feature class?

I have a feature class and a new table every few days. I need to have the table's attributes added to the feature class based on a join. What would be a good interface in ArcMap to let the user map ...
2
votes
2answers
1k views

Using newline/page break tag in ArcGIS Desktop Text_Element in arcpy.mapping? [duplicate]

I want to update a Text_Element with a newline or page break using ArcGIS Desktop 10.0. Does anyone know the tag or syntax?
5
votes
3answers
4k views

Select Layer By Attribute using loop

I have 273 features in the feature class and i want to select them one by one and use the statement in the following code. At the line: *arcpy.SelectLayerByAttribute_management ...
10
votes
2answers
2k views

How do you delete an in-memory Table View?

In a Python script, I'm cycling through thousands of Excel files and using arcpy.MakeTableView to create in memory table views from the first spreadhseet in each file. How do you delete the reference ...
5
votes
3answers
583 views

Convert polyline with Left ID and Right ID to polygons with ID

I have a polyline shape file which contain Left Id and Right ID information and struggling in converting this polyline layer to polygon with ID via arcpy. I am using ArcGIS(editor) license so feature ...
5
votes
2answers
2k views

Frequency, summarize tool options of ArcGIS for Desktop?

I'm looking for some general frequency, summarize tool. What I basically want is some tool like the summarize tool in ArcGIS (right click in the attribute table> summarize) that runs on all attributes ...
7
votes
1answer
2k views

Python-arcpy : How make feature list from gdb and value list from field and use them in gaLayer function?

I'm not an expert in python, however I have to write a script to do geostatistical analyses with the GACreateLayer function from Arcgis. I have several data (>2000) and I want to use list of features ...
3
votes
3answers
688 views

Merging edited data back into ArcSDE master geodatabase?

I need some suggestions/inspiration for a problem we have. The problem: We have an ArcSDE master GIS database. We will edit this data almost exclusively outside of ArcGIS and outside of ArcSDE. In ...
3
votes
1answer
662 views

Geocoding failure on concurrent requests with arcgis-10.0

I've created a small python synchronous geoprocessing script (ctagc) that runs on AGS. The script accepts a table (GPRecordSet) as an input parameter. The script then calls ...
2
votes
1answer
472 views

Is it possible to replaceDataSource of layer with dataset stored in_memory using ArcPy?

I use in_memory workspaces to speed up some Python script tools that get published as Geoprocessing Services significantly. The tools open MXDs and perform, among other things, an ExportToPDF. In ...
4
votes
1answer
1k views

How to list all of the contents of a geodatabase with arcpy?

This seems like a simple problem, but I have not found a way to accomplish it. I am writing a script that needs to record the paths of everything inside of a geodatabase to a text file, and later copy ...
5
votes
2answers
1k views

Using SearchCursor to access & export values in a raster table

I am desperately trying to export the values in a raster table to a .txt file. I've seen some other folk post about this, but for some reason can't get the code to work in my case. I have a raster, ...
3
votes
2answers
910 views

Add a .lyr file to multiple mxd's within a specified folder using python

I need to create a python script that will look in a certain folder or workspace, and add a certain .lyr file to each mxd in the folder. I am able create a python script that adds the layer by ...
1
vote
0answers
248 views

Relate first point and last point of polyline to point feature(s)

I am working on a small script using ArcMap10/arcpy to generate a upstream-downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line. ...
2
votes
1answer
564 views

ArcPy - Dataframe rotation - Getting a polyline length wise in the dataframe in layout view in ArcMap

EDITED: I'd like to rotate my dataframe until a polyline fits dataframe-width wise in the layout view of a .mxd. If the lines runs north/south I would like the dataframe rotated until the line is ...
1
vote
2answers
1k views

Python script has execution error first time through on a JoinField, but not the second time

I have some Python code that takes a shapefile, creates its centroids via FeatureToPoint, joins an auxillary field from the shapefile to the centroid via JoinField, and then goes on to do some more ...
2
votes
1answer
2k views

How to create a list and append objects to it through a loop

Still struggling with this script. Now I need to create an arpy.AddMessage that says "Projected: with the list of feature classes that were projected in the loop" i.e. Projected: filename, ...
3
votes
1answer
1k views

How to write a script that re-projects vector datasets in a folder?

This is probably a novice question, but I am a novice with python. I am trying to write a script that re-projects vector datasets in a folder. However there are rules in which to do this. They are: ...
4
votes
2answers
2k views

How to send long JSON objects (polygon geometry, table rows) in POST request to Geoprocessing Service?

I am seeking to understand my options for sending long JSON objects in a request to a Geoprocessing Service. In particular, I am looking for some example code to illustrate how to include two long ...
4
votes
3answers
899 views

Questions on smooth lines on soil polygon?

In a couple of weeks I am going to do QA/QC on soil polygons and I'm wonder if there is a way for me to run a script or a tool box that allow me to find the jagged lines ? Alternative, my plan would ...
4
votes
3answers
2k views

need to clear cache memory using python

I have looked at several posts here and on other sites but have not found a solution to the problem I am having with this python script. In this script I use 2 nested 'for' loops to extract a series ...
4
votes
2answers
538 views

Issues with osgeo - qgis.core and arcpy modules

Is it possible to have the python shell from either qgis or argis to load (import) both qgis.core and arcpy? I am developing a metadata creation tool and have completed the core functionality using ...
2
votes
0answers
159 views

Is there any way to suppress the calculate field dialog box in arcpy script?

I've got a python script that I inherited. The python script takes input from a variety of feature classes and tables and spit it out to a single table. When I run this script via a scheduling ...
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) ...
10
votes
4answers
2k views

ArcGIS 10.0 Python SearchCursor file locking

I have a script that gets a value from a shapefile's field to return to the user. It seems that only when the arcpy.SearchCursor is called ArcMap locks the file and it doesn't get removed after the ...
2
votes
1answer
601 views

How to save and reload legend settings using Python?

Maybe you can help me with maybe a strange question. I know how to change settings of a legend individually by arcpy (like: Patch, Title, Items, Columns, Frame, Element Size&Position, etc.), but ...
3
votes
4answers
1k views

ArcMap 10.0 Python script tool - Have the script tool dialog box stay open past successful completion of script

Is there a way to have the script dialog box have the radio button that says "Close this dialog when completed successfully" unchecked for any user who runs the script tool? Is there configuration ...
10
votes
2answers
736 views

Metadata -auto build using python

We have a large (10,000 plus) repository of spatial data (shp/gdb/tab vectors and ecw/tif rasters and also las, xyz and DEM data) where some have metadata records in xml using anzlic metadata editor. ...
3
votes
1answer
2k views

How to set the Output Extent (Environment Setting)?

I'm a bit confused as I'm trying to figure out how to set my output extent before creating Thiessen Polygons in a loop of ~100 points shapefile. (ArcMAP 10.0 - Python) for i in range(3,51,1): ...
1
vote
2answers
475 views

Adding result of geoprocessing service — consume in ArcMap desktop

I am new to ArcGIS Server. I have a Python script tool that I've published as a geoprocessing service. The script takes a point feature class, writes a subset of the input FC as a new FC in the ...
1
vote
0answers
104 views

Copied points not intersecting the original points

I'm using an arcpy search cursor to access a Oracle database. I have a simple Python class that I copy the returned row objects into, which gives me more flexiblity than the cursor. The problem is ...
4
votes
1answer
320 views

Can I delete only tables, or only objects sharing a string of text, from a geodatabase?

I've got about 1000 tables in a geodatabse that I need to delete. They are named IntersectedBuffers_1, IntersectedBuffers_2, etc, and they're the only tables in the database. Could someone please ...
0
votes
4answers
380 views

Resolving Arcpy “GetObject not point” Error

I'm new to Python (v 2.6.5) and am trying to write an ArcMap (10) script that reads the vertex coordinates of a polygon shapefile which includes a small hole (doughnut polygon). I've been working ...
5
votes
2answers
2k views

Use arcpy.mapping to list broken data layers?

I want to list all the broken links in all mxds in a server drive. But whenever I try I get an error come up. Can someone use a specific example, say the drive is D drive, how would I put it into ...
0
votes
1answer
211 views

Insert cursor raises exception on geodatabase

world, I'm having trouble to insert a line geometry into a personal geodatabase (using Python/ArcGIS 9.3.1). Everything works fine if the target feature is a shapefile. My guess is that calling: ...
4
votes
2answers
976 views

arcpy: check for same record in cell above and below

After using the find duplicates in arcmap 10, I want to check if the feat sequence ("find duplicates" marks all records with the same attributes with the same number [in "feat_seq"] and creates a ...
3
votes
1answer
331 views

gp.CreateFeatureClass(..) and gp.CopyFeatures(..) isn't copying all fields of feature class

How do I get the ArcGIS 9.3 geoprocessor to copy all of the fields of a feature class? Here is a description of what I'm trying to do: I am modifying an existing script created by a developer not on ...
1
vote
1answer
1k views

Automate converting labels to annotation in ArcMap at multiple scales?

I need to be able to convert labels to Annotation feature classes at multiple scale levels for both address and street data. Similar in concept to generating tiled layers for a web service, I have 5 ...
2
votes
1answer
440 views

Get Raster Catalog Names from a File Geodatabase Programmatically

I'm trying to get only raster catalog entries from a file geodatabase using the arcgisscripting geoprocessing API. So far I am able to do this using the ListDatasets function using the ALL argument. ...
7
votes
1answer
3k views

using arcpy outside arcmap

There may be something I'm missing, but is it possible to use the arcpy module outside arcmap? My situation is that we have one license on a computer which is shared over a network. I need to do ...
5
votes
3answers
1k views

How to repair paths of an unmanaged raster catalog in file GDB?

I'm using ArcGIS 9.3.1 and I have an unmanaged file geodatabase with raster catalogs in it. Tiles are loaded inside the catalog and each tile has a "Full Path" property which is environment specific. ...
14
votes
2answers
1k views

Calling arcpy/python from .NET?

Are there any available examples that show how python can be integrated into a .NET ArcGIS Addin or Extension? I have a series of python scripts that I would like to call from form events (e.g. button ...
0
votes
2answers
529 views

Arcpy: replaceDataSource, cad_workspace

I am having trouble replacing the data source on CAD files using arcpy. Everything I have tried runs into this error: Runtime error type 'exceptions.ValueError' : Layer: Unexpected error Here is a ...
14
votes
3answers
2k views

Do ArcGIS SpatialReference object factory codes correspond with EPSG numbers?

I've got a project where I'm reading in geometry objects from text files to put them in ArcSDE. These geometry objects have an associated EPSG code, and I'm looking for a way to ensure they're in the ...
6
votes
4answers
2k views

How to interpolate points along a line in Python for ArcGIS 9.3?

I am building a Python geoprocessing script for ArcGIS 9.3. In the script, I have a simple LINE feature class with one row, one line. How can I use a linear referencing system to interpolate a point ...
6
votes
1answer
1k views

Counting number of points in a point shapefile - ArcGIS 10.0 / arcpy

I assumed this would be an easy thing to do. I'm loading a point shapefile into a map like this: layer = arcpy.mapping.Layer(file_name) Is there a way to get the number of points in the shapefile? ...
4
votes
1answer
1k views

Repairing broken links for new paths of layers to shapefiles using ArcPy?

I have an .mxd with broken link layers and each layer has a different new path. I know the python script for repairing the broken links of the layers, but I want to put all the new paths of the layers ...
3
votes
1answer
653 views

ArcPy not running on standard console

I know this is a newbie ArcPy question, but here is the deal: While I'm inside ArcMap 10, the Python window gives me all output correctly, like this: >>> arcpy.env.workspace = ...
6
votes
1answer
3k views

Setting Output Parameter in ArcPy for Server Tool

I have published the following script tool (which is wrapped in a model, i.e. just the script tool and all of its parameters) to ArcGIS Server 10. The GP service succeeds when run, but I cannot ...
5
votes
2answers
1k views

Calculating slope cell-by-cell in ArcPy

I am relatively new to the ArcGIS-Python environment and want to calculate elevation raster slope. But it says "ValueError: setting an array element with a sequence". Below code is what I have. Any ...