2
votes
1answer
80 views

Does SearchCursor reset work in ArcGIS 10.0?

In a script I have designed a function that is used multiple times on different search cursors to search through a whole table. Function variables: p - a list of points: actually a list of ...
1
vote
2answers
709 views

Import Arcpy using PythonWin

I tried to install pythonwin26-212 from ArcGIS10.0 Desktop CD. pythonwin26-212 stops working as soon as I press "Enter" in the interactive window. (ps. I downloaded pythonwin26-212 from sourceforge ...
2
votes
1answer
176 views

How to catch invalid expression errors in Python?

I have a script that creates a new feature using arcpy.GetParameterAsText, but I'm having trouble creating an error message for incorrect user input. The input for a parcel # should be something like ...
3
votes
1answer
194 views

Exporting records from an attribute table and placing them in a txt file

I am trying desperately to grab records in a shapefile's attribute table and copy them, with additional formatting to a txt file. Below is the code I have developed thus far: I have used the ...
9
votes
1answer
336 views

Is there a way to use ArcPy and PyGRASS tools in the same Python script?

I´m trying to write a Python script, that includes different ArcPy / ArcGIS commands and want to combine it with GRASS geoprocessing tools. Unfortunately importing the GRASS libraries doesn´t work. ...
4
votes
1answer
252 views

How to join MySQL data with GIS data using arcpy?

Here is my problem, I have a MySQL database with table in it that has 4 columns: ID, Owner, Address, Legal. And I also have an ArcGIS GDB that has a parcel layer that has in it a PID field. I am ...
3
votes
1answer
204 views

pair value comparison to generate new raster using arcpy/python

I want to write a function which takes in two arguments (from two rasters) and compare those 2 values against a set of hard coded pair values inside function. Then return a value which i want to use ...
1
vote
1answer
212 views

Rectangle for Clip_management using arcpy

I want to draw an interactive rectangle on screen which should be used as the extent for clipping geometry for raster datasets. Any suggestion?
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 ...
2
votes
2answers
354 views

How to get easting & northing of cell in raster using ArcPy?

It might be very simple task. But I would appreciate if someone can comment on How I can get easting and northing of a single cell raster using arcpy as this value is used for in further steps. ...
6
votes
1answer
297 views

Why does tool take longer to run when in Python script?

I have written a python script that does some euclidean allocation. For that I use arcpy.gp.EucAllocation_sa() method. Now, my python script takes 30-40% extra time than spatial analyst euclidean ...
0
votes
1answer
929 views

Why do i get an input error no module named arcpy when i try and import it into pythonwin?

Here is the error i get when i use the import arcpy command in pythonwin: Traceback (most recent call last): File "", line 1, in ImportError: No module named arcpy Can any one tell me how to fix ...
1
vote
1answer
129 views

ResultObject: Error in getting output

I am getting "ResultObject: Error in getting output" message when I run the following code. I know it has something to do with "os.path.join" but can't figure out what. Thanks. Sam import arcpy ...
2
votes
2answers
537 views

How to truncate file geodatabase tables with python?

Everything is in the title. I need to truncate file geodatabase tables (1 or all) with python. What is the code for that? Thank you in advance!
4
votes
2answers
748 views

How to use Matplotlib in Python 2.6 installed by default ArcGIS 10.0 installation?

I am wondering if anyone has successfully run Matplotlib with the default installation of Python 2.6 that comes Arcgis 10.0. It does not seem to work with the python version installed by Arcgis 10.0. ...
5
votes
1answer
615 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
0answers
250 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. ...
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 ...
1
vote
1answer
588 views

help writing a python script

Hi I need help with writing a script: The task I have a point feature class of graffiti incidents and a polygon feature class of patrol zones with some empty attributes already created for you. I ...
0
votes
0answers
101 views

Graphing with matplotlib [duplicate]

Possible Duplicate: Can you use arcpy.RasterToNumPyArray() to Graph a Raster with matplotlib? I ask this question, but didn't get any real bites: Can you use arcpy.RasterToNumPyArray() to ...
0
votes
1answer
990 views

Create TIN from Elevation Points in Python

I want create a TIN from point features with elevation using a python script. This is my script: import arcpy from arcpy import env import json as simplejson import urllib import sys,os ...
0
votes
1answer
845 views

It is possible to edit selected features with Python?

I'm trying to edit some fields of the selected features in ArcMap. It's possible to do this with Python (ArcPy)?
5
votes
2answers
2k views

(New at Python Scripting) Creating a Loop so i can replace text in page layout in multiple mxds instead of one mxd at a time

I found some code on a website that will perform a search and replace on page layout text elements. Currently you can only do it one MXD at a time. I was hoping to change the code so I can do a search ...
4
votes
3answers
2k views

Why would “import arcpy” hang Python script run from DOS/cmd prompt?

I have a very small test script (test.py) that I use to see if Python is installed and ready to use ArcPy. All it contains is: print "Starting" import os print "OS imported" import arcpy print "ArcPy ...