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

learn more… | top users | synonyms (1)

2
votes
2answers
614 views

Zoom to Selected feature, without using 'current' in python

I am wondering if it is possible to build a zoom to geoprocessing service without using 'current' for the mxd variable in pyhton. Using 'current' my tool works in arcmap, but not in my gp service. ...
1
vote
2answers
364 views

ArcGIS Server GP Service: How to create a txt file or rename a dbf to txt in the “%SCRATCHWORKSPACE%”

My end goal is to get an excel (I'll probably just settle for .csv) file loaded from a silverlight app into my "%SCRATCHWORKSPACE%" for my gp service. I will be linear referencing the data onto a ...
5
votes
1answer
750 views

Stop an arcgis model until all values are collected and then continue

This is similar to Modelbuilder - If precondition is false, continue iterating next input but I want the iterate tool to run to collect all the values and only then continue to the merge. Any ideas? ...
1
vote
1answer
91 views

Other than the methods stated on the Desktop 10 Sharing Tools section, are there any other ways to distribute custom toolscripts?

Essentially I want to be able to distribute a custom script and it seems that I cannot create a .tbx file, so I looked into the other methods, but they are all only for Python modules it seems. What I ...
4
votes
2answers
1k views

Dynamically change zoom level of overview map to fit with current extent in DDP

I am using DDP pages in a large mapset with pages ranging from 1:7500 to 1:130,000 and the overview map is zoomed out to far to see some of the smaller zones. Is it possible to set the overview map to ...
2
votes
1answer
271 views

Altering graticule intervals logically in varying map scales using ArcPy and/or Data Driven Pages?

This question appears on many sites and I was wondering if there was a script that is now available that resolves it? Please also upvote the ArcGIS Idea that Reference grids/graticules should be ...
1
vote
1answer
464 views

Generate MXD layer info report

I'd like to generate a report about MXD layers for a handful of MXDs. I want the report to display their name, workspace path and scale range settings. I can get the first two with ArcPy but I didn't ...
3
votes
3answers
4k views

Add feature layer to display with in a script tool for desktop mapping 'App'

The point of this question is to find a way to programatically change the map extent based on user input. My method involves creating a Feature Layer & Selection, but if you have another ...
1
vote
1answer
240 views

Small issue with field calculator

What am I doing wrong in this field calculator logic? Pre-logic def re_score(elev_t,f2, contour): f2=contour if elev_t.endswith('.5'): f2 = "Midi" return f2 Expression for field "Contourtyp" ...
3
votes
2answers
1k views

Python and Data driven pages - Advanced use

I need to make a number of maps where only one input changes (a layer with the range of a radio tower) and I want to add the layer, apply symbology, zoom to it, change the title to include the name of ...
1
vote
2answers
829 views

arcpy.Delete_management not deleting

I'm struggling with deleting an mxd in a for loop. My code is: import arcpy, glob, os, datetime, time from time import strftime for filename3 in glob.glob(os.path.join(folderPath, ...
1
vote
1answer
214 views

Index out of range error when cleaning up variables

I'm running a script that parses points from a flat database structure into individual feature classes with related tables. A search cursor runs through and stores each field's data in a variable ...
4
votes
3answers
903 views

Using threading module with Arcpy: Manager/Worker architecture

I asked this question on Stack Overflow on how to setup a manager/worker scenario. But I am getting some error when trying to use threading on my Python install with ArcGIS 10 (just the python ...
3
votes
1answer
2k views

error on mxd.save/saveACopy

I'm trying to use arcpy to save an .mxd and am having an issue. It doesn't matter if I use mxd.save or mxd.saveACopy I get the same error. I know it doesn't look like I am doing anything w/ it here, ...
4
votes
1answer
946 views

Script tool Value ERROR 000735: Output Layer: Value is required?

I've been struggling to get my script tool to run without receiving the following error: <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000735: ...
1
vote
1answer
523 views

Creating bulk field aliases for several layers within same ArcSDE feature class using ArcPy? [duplicate]

I have an ArcMap with ~200 layers from the same sde feature class. After I finished adding all the layers it was brought to my attention that we need to add field alaises for the attribute table. ...
2
votes
1answer
320 views

Use arcpy.SearchCursor with raster

How can I efficiently subdivide one raster into multiple rasters using the arcpy.SearchCursor? For example if I have a slope and I was to subdivide into 3 rasters: slope1 with values between 0 and ...
8
votes
2answers
3k views

How to Rotate Features in ArcGIS for Desktop using ArcPy?

I have a series of polygons that I want to rotate. Each polygon has a rotate angle and an anchor point (xy coordinate) stored as field values. As it happens, all anchor points are on a vertex of ...
4
votes
1answer
1k views

Sorting a table on multiple fields using ArcPy

I'm trying to sort a table based on three fields with ArcPy (which should be only one line of code), and I had a "tool is not license" error. I just saw that sorting with multiple fields as parameters ...
4
votes
1answer
627 views

Iterative position within Field Calculator/Python

I'm not great with Python or programming in general, so I'm not even sure how to ask this question. Basically what I've got is in the left column, and what I want is in the right column. UniqueID ...
3
votes
2answers
2k views

Customizing label features using arcpy

I have a script that creates symbology for a polyline (contours) and then adds it to a .mxd file. My problem is that it picks the “FontName” as the default field to label on the map (see attached ...
1
vote
1answer
134 views

How to select and update from multiple tables?

I have two feature classes which have common Valve ID #s. One table has multiple service connections with a unique number. I need to select all services linked to each valve and collect the ...
2
votes
2answers
1k views

Shape files are not being adding to MXD using arcPy

I want to add a shapefile to an mxd document using arcpy but it generates the following error when used by adding script in arctoolbox import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") ...
1
vote
3answers
2k views

Error when creating insert cursor in arcpy

I've written several scripts that copy data from MS Access db into a new, empty ESRI Geodatabase. I've pretty much copied the code and changed it for each table -- the first two scripts have worked ...
0
votes
1answer
443 views

raster in TOC to geotiff on disk in ArcPy

I am really hoping that someone out there who knows a bit about ArcPy in ArcGIS10 can help me out. I am attempting to automate some work w/ netcdf files. Basically, I am able to automate the creation ...
1
vote
1answer
559 views

Specifying which ArcSDE feature class Geoprocessing Service is to update?

I want to have a geoprocessing service update sde. I am getting an I/O Error saying data doesn't exist. I imagine because the connection file (copied from my ArcCatalog folder) I placed next to the ...
2
votes
2answers
774 views

How can I “select by attributes” based on membership in py dictionary?

I am trying to write a script in arcpy that checks to see if elevation values in a point file are found in a dictionary, and if they are to produce a new point file with just those entries. Sounds ...
1
vote
1answer
981 views

How do I get statistics out of a table using Python in Arc 10?

I am very new to programming (I started learning this semester) and would very much appreciate helop with one piece of a project. I have the following table, and I need to write a script compatible ...
2
votes
2answers
1k views

ArcGIS and Python Issues with Different Versions

As we know, there are few versions of Arcgis (9.x,10) and Python(2.x,3.x) are in use. Issues are facing when we run scripts/toolbox of arcgis since the script written in one version of python and the ...
0
votes
1answer
118 views

Issue with branching model

I am having an issue with a branching model when the iteration tool is used. The test code/scripts/models are in Google docs or arcgis forums It runs and creates both versions of the process whereas ...
5
votes
2answers
5k views

How to clip a vector feature to the extent of an existing raster dataset using arcpy

I have a clipped raster dataset with polylines (from the contour tool) overlayed (see attached). I am trying to clip the polylines to the extent of the raster dataset, which seems simple enough, but ...
3
votes
4answers
641 views

Can ArcPy's AsShape be used with GeoJSON FeatureCollection of Polygons with Labels?

The AsShape documentation provides examples that work very well. However, I have been given what I believe to be valid GeoJSON that is a FeatureCollection of two polygons each with a Label. It ...
5
votes
1answer
2k views

ArcGIS License - ArcInfo level license set during python script execution vs via Desktop Administrator

We have an ArcInfo floating license available. Can I check out an ArcInfo level license via arcpy. Here, from the arcgis help, it says you can import a license level for stand-alone scripts. If a ...
2
votes
1answer
2k 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 = ...
0
votes
2answers
1k views

arcpy layer issues

This should be a really simple process but I am having issues. I want to search a workspace for all files with a certain string and then add them to the current workspace with a selected symbology. ...
4
votes
1answer
662 views

Solution to automate alignment sheet band-data on map with ArcMap 10.0 and Arcpy

Anyone have some logic or code samples to automate creating band data for alignment/integrity pipeline sheets showing various point/polyline events along the pipe in configurable way or otherwise. ...
3
votes
1answer
1k views

Sorting shapefile records on attribute to update new rank field using Python?

Basically, I am trying to sort the records within the shapefile based on an attribute(eg: pop) and then add a new field that indicates ranking based on the sort. eg: the record with the highest pop ...
0
votes
1answer
576 views

Does CopyFeatures from in_memory via Python script tool cause General function failure for you?

The Python code below looks pretty straightforward. import arcpy if arcpy.Exists("D:/temp/test.gdb"): arcpy.Delete_management("D:/temp/test.gdb") if arcpy.Exists("in_memory"): ...
2
votes
1answer
110 views

How to write infinity to a feature class in arcpy?

Is it possible to write infinities to fields in arc feature classes, and if so, how? Currently I get an exception thrown when I try.
4
votes
1answer
672 views

Using ArcPy for Copy Parallel, Move, etc (from Editor toolbar)?

Since VB can activate the Editor, then use the tools listed in the Editor, such as copy parrallel, I am wondering whether Python can do the same job? I have been searching the website all day. Still ...
2
votes
1answer
457 views

Convert point XY to page units XY using arcpy?

I am using arcpy to export PDFs from my ArcGIS Server application. I want to move a TextElement in my layout view to the centroid of a selected feature. I can get the centroid of the feature, but ...
0
votes
0answers
405 views

How to: ArcGIS Server GP Service messaging back to silverlight client

How would I get messages back from my GP Service to the Silverlight client? I am passing the GP service some data to process and I want to have the GP service give some response that the Silverlight ...
4
votes
1answer
941 views

Network Analyst: arcpy's 'Solve' running out of memory

I've run OD cost matrix analysis using GUI tools n ArcGIS 10. My goal is relatively simple - find closest 50 neighbors for each origin point. The dataset I'm working with is relatively large: ...
1
vote
0answers
191 views

ArcGIS 10.0 - How to have GP Service make rest calls instead of Silverlight client?

I have a Silverlight client that densifies a user drawn polyline. The returned vertices from the polyline are then sent to esri elevation sample server for each vertex to find an elevation value. ...
1
vote
1answer
719 views

Dynamic Text in ArcMap 10.0 and arcpy - getting user name in specific format

I need to put in a specific text into a text element. The initials of the user who built the map. With arcpy I am trying to set the text element with dynamic text. If I put <dyn ...
1
vote
1answer
692 views

How to achieve more than basic labelling of Reference Grids (Graticules, Measured Grids) in ArcGIS Desktop?

I'm happy to be corrected, but at the moment I do not think it is possible to meet any of the following mapping requirements using either ArcMap or ArcPy: Label measured grids using a format like ...
3
votes
3answers
2k views

Geoprocessing with ArcGIS Server 10.0 - %scratchworkspace%

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Key_concepts_for_geoprocessing_services/002v00000002000000/ I'm trying to have a new GP Service arcpy.AddMessage() the scratchworkspace ...
2
votes
2answers
421 views

Tables in ArcMap 10.0 - are they layers or tableviews

Is a table in ArcMap a layer or a tableview. I want to be able to feed a table into an UpdateCursor via a toolbox script. If my table has a definition query on it how do I check for that with ...
6
votes
2answers
1k views

Creating geodatabase from CSV using python

I have a file with weather data (daily) for multiple weather stations for multiple years. I am looking for some python script to automate the database creation process and its interpolation on a daily ...
5
votes
3answers
537 views

How not to Copy Features when too many would be output?

This question has already been posed to the ArcGIS Geoprocessing forum but I have had no responses there. I have a 3.5 million polygon layer (cadastre) stored in Oracle via ArcSDE. I use a polygon ...