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

learn more… | top users | synonyms (1)

0
votes
2answers
24 views

How to Add (+) up integers in a field and print a total count in pyhton 2.7

I'm a complete beginner to python. I have what I hope to be a simple question. I want to run a bit of script in IDLE so that it adds up all figures in a table under attribute name "Tot_Aff". When I ...
1
vote
1answer
21 views

ArcGIS10.2 Data Merge error: 000732

I am running python in the ArcGIS python window. ArcGIS shows error message when trying data merge from arcpy. File "", line 1, in File "c:\program files ...
0
votes
0answers
27 views

Syntax error using Con() arcpy [on hold]

I keep getting a non specific syntax error when writing some map algebra using the Con() in python, "There's an error in your program: invalid syntax".. outCon1 = con(((ten == 1) | (fourteen == 1) | ...
0
votes
1answer
30 views

arcpy to perform “select by attribute” and display the result on the map in a table [duplicate]

I am thinking to use arcpy to select by attribute, after that I want to display the selected features attribute in a table on the map, how can I make it? Thanks in advance.
3
votes
1answer
36 views

How to store Python Add-In menu customization/configuration in *.esriaddin file?

There is a gap in my understanding of Python Add-Ins. When I create a Python Add-In it is easy to see where buttons, tools and extensions are implemented as Classes in the *_addin.py script of the ...
2
votes
1answer
18 views

How to use ArcGIS Data Interoperability tool in ArcPy?

I created an ArcGIS Interoperability Tool, which I like to use in my ArcPY script. In order to find the correct code I created an ArcGIS Toolbox Model including my Interoperability Tool, and exported ...
1
vote
2answers
39 views

Performing an Arcpy code using Python on all shapefiles in a folder or geodatabase?

I have a geodatabase with many polyline feature classes all with different names. I would like to write a code in python ArcGIS 10.1 to use a geoprossing tool on all classes in the gdb. How would this ...
0
votes
1answer
36 views

How Do I Snap a CSV to a SHP Using ArcPy?

I'm a veteran Python programmer very new to ArcGIS. I'm trying to do what seems like it would be a simple operation in arcpy, but I don't think I know enough about the ArcGIS terminology to do more ...
2
votes
1answer
32 views

How to use the List field function for a toolbox script?

i´m trying to write a simple script for a toolbox, similar to the Addfield_datamanagement toolbox. The script adds a new field to a table of a feature class or a shapefile with attribute tables. So ...
0
votes
0answers
78 views

How to export from ModelBuilder as script and then run using Python. 3.4?

I'm currently studying for a Msc in GIS. In my assignment I have been asked to produce a model builder, export that model as a script file and then run that script as a stand alone in IDLE. So ive ...
-1
votes
2answers
27 views

How to use raw_input() with while-loop? [on hold]

my task is to execute multiple buffers with the list-loop! import arcpy arcpy.env.overwriteOutput = 1 arcpy.env.workspace="C:\\salzburg.gdb" sbgRivers="sbg_rivers" buff_name=raw_input("Please ...
0
votes
1answer
71 views

ArcGis Python Script, Calculate Field

Sorry for my English. I am trying to write a Python Script for ArcGis 10.2. #import system modules import arcpy import math from arcpy import env #Set environment options ...
0
votes
1answer
23 views

Calculate text field based on codeblock query of numeric field

I am trying to populate a field with a L/R bank designation based on a route measure (as part of a larger script), but I am struggling. I have a shapefile created (tir_pts_lyr), I have a blank column ...
-1
votes
0answers
45 views

How to return value into a python list using search cursor [closed]

I would like to retrieve the temporary value which are done from searchCursor. I want those values to be stored inside an array (preferably a 2D array, as i have to store objectid,x,y , also there is ...
-2
votes
3answers
62 views

Use VB to calculate an area of a shape

I'm using Arcmap 10.1, running python 2.7 on a Windows 8.1 machine. I have a script that uses the arcpy.CalculateField_management function to calculate the area of a shape, however, for some reason ...
1
vote
1answer
35 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 ...
3
votes
1answer
62 views

Can arcpy.env.workspace be set multiple times in same script?

Is it possible to set arcpy.env.workspace multiple times in the same script to ListDataFeatures from different workspaces? eg. import arcpy def readFromGdb(): arcpy.env.workspace = ...
1
vote
0answers
41 views

How to replace data source of annotation feature classes using ArcPy?

I want to batch replace paths in a series of .mxd files using Python. Many of the layers have moved and in some cases the name has changed or its dataset is different. I've written this code which ...
2
votes
0answers
8 views

How to access annotation feature classes in ArcPy? [duplicate]

I want to batch replace paths in a series of .mxd files using Python. Many of the layers have moved and in some cases the name has changed or its dataset is different. I've written this code which ...
0
votes
0answers
32 views

How do I set the xydomain extent and merge point feature classes in a geodatabase

I am trying to select point feature classes in a feature dataset and merge them while setting the XYDomain using Python. If I do the merge manually and change the environment settings to use a ...
1
vote
0answers
33 views

Alternatives for ArcGIS Data Reviewer? [closed]

What are some QA/QC tools that act similar to the Data Reviewer to point out and save mistakes? I want to know all alternatives, but mostly would want to run them in 10.1 and or using arcpy. I want ...
1
vote
1answer
19 views

MakeQueryTable_management

When I run this code, it says "An invalid SQL statement was used". Any idea what does it mean? import arcpy from arcpy import env env.workspace ="C:/RG/Projects/CriticalDataNetwork/CDEC.gdb" try: ...
4
votes
3answers
110 views

Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

I would like to convert 1000 dbf files to CSV. All dbf files are in one folder and they have sequential names (S:\output_tables\tcb1.dbf, S:\output_tables\tcb2.dbf, S:\output_tables\tcb3.dbf, up to ...
3
votes
2answers
127 views

Converting Vertices of Polylines and Polygons to Points and Maintain Attributes

I'm pretty sure someone has done this before, but I'm having no luck. I'm using ArcGIS Standard version 10.2.1 and I want to convert all the vertices of a polyline or polygon to points. Essentially, ...
-1
votes
1answer
69 views

Maximum length of path using arcpy? [closed]

I'm using ArcGIS 10.1. When I try to run the script it gives me this error message. ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Data: Dataset 'Q:\Field Data\6th ...
0
votes
0answers
27 views

Merging features with arcpy + use of “in_memory” [closed]

I am working with layer of parcels and I'm writing a script (to convert into an add-in button) that essentially recreates the functionality of the Merge tool from the Editor toolbar. Basically, the ...
1
vote
1answer
24 views

How do I filter the layers that show for my input feature layer parameter for a custom tool?

When creating a custom tool using a Python script, is there a way to only show layers that, for example, contain a certain word? For the drop down of the input polygon feature, I only want layers to ...
1
vote
0answers
46 views

Managing large number of catchments/watersheds

Does anyone know of an easy way to manage a large number (10,000's) of catchments/watersheds? I have defined a stream network and for each segment, I have a corresponding catchment (in a unique ...
0
votes
1answer
63 views

Error with Python Script tool for ArcGIS 10.2 [on hold]

I am trying to create an ArcGIS map tool that includes creating TINS and uses parameters. This tool works fine when taking the data from shapefiles, but when I use map layers, which is what I want it ...
3
votes
1answer
71 views

After ArcGIS 10.2.1 update, Arcpy 64 bit import Error

I've updated my ArcGIS desktop version from 10.2 to 10.2.1 and have noticed that when I run the 64 bit version of IDLE I now get an error when trying to import arcpy: Python 2.7.3 (default, Apr 10 ...
0
votes
1answer
25 views

How do I check spatial reference on all parameters during Tool Validation?

How do I check spatial reference on all parameters during Tool Validation? Just looking for recommendations. Here is what I have already. This must work with existing validation. import arcpy class ...
0
votes
1answer
24 views

ArcPy - Add Layer from Cursor Selection

I am trying to add layers from the fields of a reference layer using select by location and a cursor. Also, want to prompt the user with a message box asking if they want to add the selected by ...
6
votes
1answer
161 views

Is it possible to interrupt Select Layer By Location when first feature selected?

I´ve got a point feature class with some 7.000.000 points and I´m trying to check if any of these points is simply intersected by several polygon feature classes using 'for' loop and ...
0
votes
0answers
27 views

How to compare features of two different geodatabases using ArcPy?

I would like to use the feature compare tool in arcpy two compare the contents of two different workspaces. I wrote this code for this purpose. Unfortunately I´m getting any output although there some ...
1
vote
0answers
28 views

Why does clip only return the top polygon?

I'm running the command below on a data set with many stacked polygons. This is a county standard so I can't change the way they manage their data. Each type of polygon can be uniquely identified ...
1
vote
2answers
47 views

Change field map properties in ArcMap

I am trying to import csv files in ArcGIS to do a join. However, some of the fields are identified as double, some as long and some as long. Therefore the join results in bunch of columns with NULL ...
3
votes
1answer
27 views

Why is Mosaic or Mosaic To New Image causing a 1-pixel gap between adjacent images?

I have a series of adjacent PNG images, and I'm trying to merge/mosaic them into a single seamless image. The images have clean "cuts" between them, with no overlaps. However, when I use either the ...
0
votes
0answers
23 views

arcApplySymbologyFromLayer w/out adding to map

Is there a way to apply symbology from layer without adding to map. I have heard there an environment setting that may allow this? I am trying to both apply symbology and add layer at position in a ...
3
votes
4answers
143 views

How to convert all values in all fields of table to upper case using ArcPy & Python?

Does anyone know how to use the .upper() in a stand alone python script so it can be used to change all characters in a table into UPPER case? I don't want to use the field calculator since I have ...
-2
votes
0answers
41 views

intersect zip python

I try to change the python script ExtractData to do the intersection., but until now I fails to do so. i change the funtion : clip_analysis by intersect_analysis. i change also the parameters: ...
0
votes
0answers
16 views

Min value (OD Cost Matrix)

I have an attribute table with columns that I have gained from running an OD Cost Matrix. In one column named "Total Minutes" I will select the lowest value (the shortest route). Then I will create a ...
0
votes
1answer
38 views

arcpy absolute file path failing with AddLayer()

I have the following code: import arcpy.mapping as mapping mxd = mapping.MapDocument("current") print mxd.title df = mapping.ListDataFrames(mxd)[0] print df.name layer = ...
1
vote
0answers
36 views

How can a script tool share (dynamic) variables among different modules?

I'm running a python script from the toolbox window (as a script tool). I have a second python (tkinter) module that I use as an input interface. Now, I know that the script tool can call the ...
2
votes
0answers
34 views

Is there a way to position parameters in a Python script tool dialog box?

I admit I haven't searched for an answer yet. I was wondering if there's a way to get these boolean parameters to be next to each other instead of one on top of the other?
1
vote
1answer
28 views

Transfer domain descriptions from coded values to string text at a new field

Further to my earlier question,I'm trying to develop a script that eventually should contain three parameters, feature layer, domain field and a new text field. How can i write a loop that will update ...
0
votes
2answers
60 views

How to return the first row of feature class as a list in ArcPy?

I need to return the first record of a feature class as a list. Is this possible? I can't seem to figure it out using row.getValue() as it does not allow me to put a wildcard in there.
2
votes
0answers
22 views

Basic arcpy script with cursors running SLOW!

I've got 2 polygons layers (no gaps): IDUs and crops. What I want is to identify the 3 largest crops by % area for each IDU. This seems common enough but I couldn't find a way to do it all using ...
0
votes
2answers
38 views

How to add data to a newly created folder using arcpy?

I'm writing a script to create a new folder and then copy a feature class to a shapefile and add the shapefile in the new folder. The folder gets created but the script is failing on the feature class ...
0
votes
2answers
43 views

Find the minimum elevation pixels from an elevation raster using arcpy

I want to create a python script to find the minimum elevation pixels from an elevation raster (aster,srtm) using arcpy and arcmap 10.1. The purpose is to reclassify these pixels. I have tried but I ...
1
vote
0answers
19 views

How to Build Query Table from two OLE DB tables using ArcPy?

When I run the following code to create a subset of a table, the error says "An invalid SQL statement was used" [Query]. The error shows in line 39. Is there any idea you can figure this out? import ...