1
vote
1answer
60 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
407 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
177 views

Export data driven pages only in changed mxd, with arcpy script

I have an arcpy script below to export a map book to pdf. The index layer are forty acre boundaries (township and range quarter sections). The data in the mxd is on an oracle database and updated ...
0
votes
0answers
142 views

VBA Code to wait until Python returns value

I have written a code in VBA, I am passing parameters to Python and creating a buffer there. After that I am passing that buffer layer and further processing in VBA again. Here is the code for ...
1
vote
1answer
102 views

Create a new File Geodatabase(10.0) using data from existing Filegeodatabase(9.3)

I want top create a new file geo-database using python, which I am able to do using arcpy.CreateFileGDB_management(Fpath,"TestGDB","10.0") But I want to transfer all data from an existing File ...
2
votes
1answer
160 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
2answers
2k views

How can you auto-increment in a Python Script (not Field Calculator)?

I want to autoincrement values in a field within a Python script. I've done this using Field Calculator and the code referenced here. I tried using this code in the Python script below but it is not ...
3
votes
1answer
176 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
321 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. ...
5
votes
2answers
813 views

Get X, Y coordinates in the center of a raster cell

I am trying to get the X, Y coordinates of all the cells of a raster file, using Python 2.6 and ArcGIS 10.0. I would like to get the X, Y coordinates in the center of the cell. Is there any way to ...
3
votes
1answer
190 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
198 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
3answers
1k views

pop up message box before a tool execution with arcpy/python

I want to add a box message to pop up before execution of a button tool. When I click a button which will do geoprocessing, i want a box to appear on view before processing with message that i am ...
2
votes
2answers
345 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
279 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 ...
1
vote
1answer
123 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 ...
1
vote
1answer
168 views

Import works in Pyscripter2.6 and Python26 Console, but not in ArcMap

I'm trying to "import clr" and get an error saying "dynamic module not initialized properly". It works fine in Pyscripter and the regular console (which is actually updated from the PythonNet build), ...
1
vote
1answer
2k views

add definition query to layers in a group

I'm trying to develop a python code that will apply the same definition query to all layers in a specified group. I currently have a working code that will apply a definition query to all layers in ...
4
votes
2answers
701 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. ...
4
votes
0answers
561 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? ...
0
votes
1answer
135 views

geodatabase and relationship

I have two tables in a personal geodatabase and one of them has 13 records and 6 fields, the other has 118 records and 125 fields. There is a relationship class between the two tables where the first ...
3
votes
3answers
916 views

Using Python in ArcGIS 10, create a line between the middle of the polylines which are intersected

I have got a river network as a feature class in a gdb. I need to calculate the topologic attributes via the connectivity graph of the river network. A graph-theoretic representation of river ...
4
votes
1answer
509 views

How to create a shortcut (a button) for “Make this the only selectable layer” in Python 2.6?

I'm trying to create a script in Python 2.6 to make a button or a keyboard shortcut for "Make This The Only Selectable Layer". I came across the following VBA scripts on the net, but the problem is ...
1
vote
1answer
570 views

create a fishnet using lat/lon table text file

I have a text file with lat/lon table values and want to use this information to generate a fishnet using python. Any heads up would be deeply appreciative. Also please point to if this has been ...
3
votes
3answers
932 views

VB/Python script to populate a field with maximum value among other fields

I am using ArcGIS 10. I have a little experience with python but i feel that python in ArcGIS is slightly different. VB will work fine as well. Problem: I have n different columns called 'percent_1', ...
0
votes
1answer
1k views

Create HTML report using Python

i want to create Analysis report after createing model for generating cut/fill. Once it will done , basedon this cutfill/table, would be display statics in html formate using python. is it possible. ...
0
votes
1answer
945 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 ...
3
votes
1answer
2k views

How do I programmatically create non-feature-linked, simple line callout annotation and set the anchor point?

Vitals: ArcGIS-ArcView 10.0, Python 2.6.5, PythonWin, comtypes I'll start with my main questions: How, using ArcObjects, do I go about creating non-feature-linked geodatabase annotation features ...
0
votes
1answer
167 views

Accessing smb share on Trimble YUMA with python

I need to write a script that would import a .shp on the YUMA to a gdb on the script/host pc for manipulation with arcpy. I can't seem to find a smb python module. So Im not entirely sure on how to do ...
1
vote
0answers
448 views

ArcObjects: How to get the size of the formatted text part only of a TextElement whose text contains formatting tags?

I'm working in ArcGIS 10.0 and Python 2.6.5. I have a string, say 'mMx', that I want to enter into a TextElement (in the data view). The lowercase letters are to be substituted with a graphical ...
2
votes
1answer
331 views

ArcObjects ITextSymbol.GetTextSize in Python revisited: usage with StartDrawing and FinishDrawing methods

I am using ArcGIS 10.0/ArcObjects and Python 2.6. I am trying to get the usage of the ITextSymbol.GetTextSize method correct. The syntax, as established in an earlier question, is: dblx, dbly = ...