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

learn more… | top users | synonyms (1)

2
votes
0answers
313 views

Running x64 bit geoprocessing Python in Python IDLE 2.7.6 x64 error

I am trying to set the Python IDLE 2.7.6 x64 to run the arcpy module from ArcGIS x64 bit geoprocessing (10.2.2). I copied the file DTBGGP64.pth from C:\Python27\ArcGISx6410.2\Lib\site-packages to ...
1
vote
1answer
85 views

row.getValue() doesn't work but row[1] does

for some reason I can't get row.getValue to work properly... my script will only work if I use row[0] and get the value manually but I am sure the location/order of my fields will change from dataset ...
0
votes
1answer
30 views

How to group numbers based on first digits and then find min/max? [closed]

I have been struggling all day with this. I wish Python were more like SQL it would be so easy for me, but I am still learning. Basically, I just want to group numbers based on their first four ...
0
votes
3answers
309 views

Can't Clear Combobox - Arcpy Addin

I'm using ArcGIS 10.2.1 and have written an Arcpy addin with multiple comboboxes and an "Unselect" button. The comboboxes run queries on the data and the button clears the selections. I need the ...
3
votes
0answers
61 views

Arcpy in Python Plugin for SPSS

Is it possible to run the arcpy module in the Python for SPSS plugin to run the search and update cursors?
2
votes
1answer
1k views

Getting ValueError: max() arg is an empty sequence on a Python Script in the Field Calculator in ArcMap

I have a script that populates a FacilityID Field on a Attribute table in the Field Calculator but when I run the script below I am getting a error. EDIT: Python Script: def autoInc(): import ...
1
vote
2answers
82 views

Clip for each feature

I want to clip a polyline feature class by a polygon feature class (buffers created from points). Several polygons overlap, so I want to get each polygon feature clipped with each polyline feature. ...
1
vote
0answers
201 views

Using arcpy.CopyFeatures_management results in a 000210 using a database connection that does not contain saved credentials

Currently have a problem running CopyFeatures_management in ESRI's ArcGIS 10.1 The following shows two Enterprise Geodatabase connection files. One includes the username and password and the other ...
2
votes
0answers
250 views

Split a Polygon that Crosses International Date Line, ArcPy [closed]

I have a lots of existing data in WGS-1984 (too much to manually edit). I need to split these lines and polygons by the international date line. More projection information: ...
0
votes
1answer
127 views

Batch renaming of shapefiles using ArcPy and folder name where shapefile is stored?

I am very new to Python and wondered if anyone had any idea how to do this? I have ~100+ shapefiles named 'land boundary' within the folder of their site name. Is this possible using Python in ...
4
votes
2answers
99 views

ArcGIS Toolbox, parameters for python script not as positional arguments

I have an ArcGIS Toolbox with a bunch of parameters. A python script is used to perform some raster operations, based on this parameters. I am using Python argparse in the script to get the ...
0
votes
0answers
50 views

when using arcpy.mapping.ListDataFrames, python.exe crash

Has anybody had this problem? this drive me crazy. what is wrong with my code? import arcpy mxd = arcpy.mapping.MapDocument(r"D:\Project\Project.mxd") df = arcpy.mapping.ListDataFrames(mxd, ...
4
votes
1answer
104 views

Most efficient method to join multiple fields in ArcGIS

I have as set of shapefiles with approximately 300000 polygons each, as well as corresponding point shapefiles and tables with approximately the same number of row (equal or less rows than the ...
2
votes
2answers
47 views

How to obtain the value of a feature programatically, based on a coordinate

I have a point layer, and a polygon layer, and I wish to calculate the value of an attribute from the polygon layer at each point's location. Eg, find the area of the polygon which is found at each ...
0
votes
1answer
124 views

How to select a feature and get its fields by mouse click using Python Addin in ArcGIS?

I'm building a python addin tool in arcgis and I would like to click a feature, say a polygon on the map, and get the polygon's attributes,i.e. ID=3,NAME = "CITY3"...It's similar as the arcmap tool ...
1
vote
1answer
553 views

How to create a polygon feature class from polylines in Python Arcgis?

I am trying to create a polygon from polylines. I've created this script but it gives errors of Arrays. Thanks. import arcpy polyline=r'C:\temp\temp_lines.shp' ...
0
votes
2answers
45 views

A tool as part of a dialog box

I have a button created using Python Add-Ins which pops up a dialog box which is built using wxpython. I am wondering if I can place a tool (Select Layer by Location) within that dialog box to get ...
0
votes
2answers
60 views

CalculateField_management no-success

The following script is suppose to do the following, similar to what was done here: Renaming a field using arcpy. Create a fieldlist. Read thru the fieldlist and create a new field named "OLD_" + ...
0
votes
0answers
40 views

Determine Transect line to cover area

I'm near certain this is a solved problem, but I haven't been able to find a solution from searches so here's my situation (probably I'm searching the wrong thing)... I need to compute the ...
1
vote
1answer
78 views

Cost Distance Paths in Python

I have a feature dataset with 317 points (UpperPoints) and another with 394 (LowerPoints) points. Now I want to calculate the cost paths as in this example here. However there are multiple files used ...
1
vote
1answer
184 views

Waiting for a python script tool to complete while using pythonaddin button

I have created a pythonaddin toolbar, with a button that executes a python script tool. This tool is in an ArcToolbox which has been stored in the Install folder of the addin. It executes and runs ...
0
votes
0answers
23 views

Using file directories from a table

I have a toolset that will be using a set of file directories as input (shapefiles, raster etc.).The table can be stored as CSV or DBF. Is there a way to read a specific cell (row,column) of the ...
0
votes
2answers
162 views

Python ArcGIS 10.0 Expanding select layer by location from point (walking selection)

I have an old ArcView 3 tool which I've been tasked with converting to Python. I'm breaking it down into stages, but there's a "walking selection" I can't trap. To put the query in context, the user ...
1
vote
2answers
118 views

How to create report using arcpy in arcgis 10.2 (result the same as using view -> Reports -> Create Report)

I need to create reports in arcgis 10.2. because I am not intent to request user to go through all the steps for generating reports, so I want to create an add-in tool to do this. The result is the ...
0
votes
1answer
36 views

arcpy to handle topology error inspector

I am now want to do topology check use python, but I don't know whether arcpy can realize the function in error inspector. May I call error inspector and get the error records(something like attribute ...
0
votes
1answer
73 views

Can I validate topology using python script when ArcMap is open?

I am testing on validating topology using python.The situation is when I run the script when arcmap is open, an error occurs which indicates the topology has already been opened (FDO error: ...
2
votes
1answer
179 views

ESRI File Geodatabase with a field calculator with an incrementing number

I've got a python script that runs on the Field Calculator of a ESRI File Database. Right now it runs correctly in that it will increment the last three digits of the value. But this is a script ...
1
vote
1answer
43 views

ArcPy in_memory\ vanishing from ToC

ArcGIS 10.1 - attempting to add a derived raster layer to the ToC. This works in 10.2. In 10.1 I get a screen flash and nothing added. rasterized = r'in_memory\rasterized' ...
0
votes
1answer
145 views

How to compare two rasters and reclass the greater value(python script)?

I am working on an assignment that requires us to reclass a raster(via python) from two rasters. We need to compare the power received at one cell(on raster1) and compare it to the same cell on raster ...
1
vote
1answer
60 views

Updating MXD layer definitionQuery in arcpy is very slow

The code segment below has been extracted from a larger project. In short, I have an MXD which I want to generate multiple PDFs based on different criteria. The code below works. It loops through ...
2
votes
3answers
376 views

How to extract data using arcpy.da.SearchCursor

I have a shapefile of point features showing fire locations in a given year. One of the fields is named "YYYYMMDD" and indicates the corresponding date that that fire happened. In Python, I am trying ...
3
votes
1answer
125 views

Python script (ArcPy) crashing one machine, but works on others?

I have been woking on a script that will select parcels that are within a particular ArcGIS 10.1 data driven page, create a list out of those parcels, and then populate a text element within my MXD ...
1
vote
1answer
65 views

How to generate StreetFrom and StreetTo data from street segments?

Background: I have a polyline feature class of about 4000 street centerline segments for which I would like to add data on what streets the segments intersect with. I would like to add some new ...
0
votes
1answer
82 views

Determine distance between two lines at multiple locations

We have a number of features that look something like this: I need to measure the distance between the edges of a track (two lines) for all the tracks, and flag locations where the track width ...
2
votes
2answers
88 views

ArcGIS date field to integer

I have a featureclass with a 'date' class field named 'ACQ_DATE' formatted as: 1-8-2013 24-7-2013 etc. As you can see the number of digits is not harmonized. I want to display the dates on a ...
1
vote
1answer
61 views

Updating a Tool Validator Class from a CSV File

I have a CSV file which contains a list of clients and different project numbers and project names. This list is generated periodically. The list can contain multiple values for client name but ...
3
votes
1answer
158 views

ArcPy / ArcMap 10.2: How to report data to user?

I'm developing an arcpy addin with ArcMap 10.2 that outputs a feature layer based on user input. How can I display attributes from this layer in a MessageBox or other reporting mechanism? I don't ...
0
votes
3answers
183 views

Multiple Conditional Statement with in a Con Tool

Well i want to apply multiple conditional statements within a Conditional tool. My aim is to loop through a list of rasters and on the basis of a specified range assign each range with a constant 1, ...
0
votes
2answers
80 views

How to make variables output to user defined workspace

I am running a script in ArcMap and I want to reference the user defined workspace as an output instead of hard coding it in. I have the scratch output set as a user defined parameter. However, I ...
1
vote
2answers
42 views

When creating XY Feature in Arcpy, null values resulting in field being text not numeric

I'm trying to create a feature class from a csv / tab delimited file. All the fields in the file are numeric, but some have null values, and those fields are being coerced into "text" types. ...
3
votes
1answer
247 views

How can I rename multiple feature classes (each different name) using Python?

I have a geodatabase including (cnty06,cnty07,cnty08,cnty09...) that I'd like to rename to (c06,c07,c08,c09...). I can use the ModelBuilder (or script from ModelBuilder) to complete this task. Is ...
1
vote
2answers
56 views

ApplySymbologyFromLayer [closed]

I am a new user of Python on ArcGis10 i am trying to apply symbology settings to multiple files but to no success. I have tried my own ways copied syntaxes from various places still getting error. The ...
1
vote
1answer
91 views

Error with data frame in python script

I'm running a python script from arccatalog and it works, however, I am trying to add layers to an mxd and need to declare the data frame. I keep getting this error message. type ...
1
vote
0answers
216 views

Token Error with ArcGIS Server 10.2.2

I am using the ArPy example from esri sample. Script was working fine but then I updated my ArcGIS Server to 10.2.2 and I am getting this error: Token Expired, Code: 498. I have proper credentials as ...
3
votes
1answer
164 views

Why does the next() method fail after the last record, using arcpy.da.SearchCursor?

Using the older arcpy.SearchCursor, the next() method would return Nothing once the last record had been passed. Using the newer arcpy.da.SearchCursor, I'm finding that the next() method crashes the ...
2
votes
1answer
200 views

Get a Shapefile Geometry Type

I am making a python code for Arcgis9.3. In this code I have an input feature and I create a Output feature. I want that the output feature is the same geometry type as the input feature. At the ...
2
votes
1answer
145 views

ArcPy Clip Data Frame To Geometry

I have made an ArcPy add-in that assists a user by adding layers from a nominated fGDB to their map based on a nominated extent. I wish to add a button that changes the data frame properties to clip ...
3
votes
1answer
52 views

Crosstable two fields of a pointfile (ArcMap)

I'd like to produce a simple crosstabulation from two fields of a point feature class. These fields contain land use class information which I'd like to compare. One option is to export a dbf and do ...
1
vote
1answer
124 views

Backup several SDE database connections

This question stems from my previous question on how to list databases based on SDE. Now I want to copy them and have it written as a function so I can list out each database connection below it so ...
1
vote
1answer
147 views

Tool or environment <MakeFeatureLayer_management> not found, Failed to execute (AttributeSearch)

I have created a arctoolbox with scripts in it. In the script, I set the source script file (a python file), my question is when I run this python using a batch file, it won't cause error, ...