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

learn more… | top users | synonyms (1)

4
votes
1answer
88 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
46 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
93 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
300 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
41 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
48 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
34 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
62 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
142 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
21 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
111 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
82 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
30 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
53 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
157 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
40 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
107 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
52 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
212 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
113 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
56 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
61 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
64 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
53 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
142 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
140 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
62 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
36 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
160 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
43 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
70 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
152 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
124 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
146 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
104 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
46 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
86 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
100 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, ...
2
votes
1answer
78 views

Using the UpdateCursor to change the values in fields added with arcpy.Addfield_management

I am working with some ArcGIS data and trying to add fields using AddField_management. >>> arcpy.AddField_management("huc4","Class","TEXT") I want to populate this new field using the ...
-1
votes
1answer
63 views

Raster Calculator Workaround in Arcpy for Suitabiliy Analysis

This is my first attempt at a complex stand alone python code. I am self teaching the arcpy module, well at least attempting to. I am having a great deal of difficulty getting my site suitability ...
2
votes
2answers
127 views

ListFeature classes in SDE

I have this code: def backSDE(ActiveSDE): arcpy.env.overwriteOutput = True arcpy.env.workspace = ActiveSDE fcs = arcpy.ListFeatureClasses() print fcs #Databases ActiveSDE = ...
4
votes
1answer
83 views

How to automatically check for lidar flight line overlaps?

I have a series of lidar-based raster products created via FUSION. Since I am working with low density lidar data, many of the raster images show significant striping where lidar returns overlap on ...
1
vote
1answer
78 views

How do you set up XY Event Layer Parameters on ArcGIS Script Tool? (asking for user input)

I've made the XY Event Layer work through python script, but can't get it to work correctly as a python script tool on arc, asking for user input. Does anyone have any suggestions? This is the script ...
0
votes
1answer
46 views

Same field names as given in text file (in a script) [duplicate]

I have a raster (ras) and a text file (T, DA, etc). When I join both then field names are like following: ras.vat:T ras.vat:DA I have to access these fields using SearchCursor for further ...
1
vote
1answer
92 views

Error when dividing a field with a number

Using arcpy CalculateField_management i want to divide a field with a spacific number: arcpy.CalculateField_management(EZG_shp, "IDX_AT_PK", "(!EURO_SUM!/!Anz_Pers!)/1668,4","PYTHON") This works in ...
1
vote
1answer
56 views

Remove all default values on multiple feature classes

I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to ...
0
votes
2answers
107 views

I need an arcPy script for choosing objects from a table at random

I am trying to write an ArcPy script that will select X number of rows from a table with N number of objects in it, then output that selection to a new layer or shapefile. I need to be able to ...
0
votes
2answers
57 views

Naming your Output feature class?

I am working in a work space in python on ArcGIS 10.1 on a remote desktop. Here is my code import arcpy from arcpy import env env.workspace = "E:\Example" PST = arcpy.ListFeatureClasses ("", ...
-1
votes
1answer
43 views

Esri ArcGIS 10 - using ArcPy to select buffer line by length

I created a buffer, then converted polygon to line (around a city block). I want to select the internal line. I'm thinking since there is no uniform way that ArcGIS labels the interior or exterior ...
0
votes
1answer
47 views

Adding Rules to Topology with Arcpy: getting ERROR 000714

I want to make a very basic python script, however I keep running into error 000714 (general/unknown script error). The topology is created, the features are added to it, however the rule is not. ...