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

learn more… | top users | synonyms (1)

1
vote
0answers
10 views

Multiple arcpy.env.workspace

thanks in advance. Is possible to set multiple env.workspaces on the same script to listDataFeatures from different spaces ? eg. import arcpy def readFromGdb(): arcpy.env.workspace = ...
0
votes
0answers
7 views

trouble accessing annotation feature classes in 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/dataset is different. I've written this code which takes an ...
0
votes
0answers
9 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
24 views

Alternatives for ArcGIS Data Reviewer? [on hold]

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
14 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: ...
3
votes
2answers
43 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
105 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
61 views

Maximum length of path using arcpy? [on hold]

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
21 views

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

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
23 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 ...
0
votes
1answer
48 views

Error with Python Script tool for ArcGIS 10.2

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
0answers
46 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
21 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
20 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
148 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
26 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
27 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
41 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
25 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
22 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
131 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
38 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
35 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
26 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
55 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
21 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
36 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
41 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
18 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 ...
1
vote
2answers
35 views

How to get/set label scale ranges (e.g. minScale) in ArcPy?

For a layer object lyr, one can programmatically set the minScale in arcpy as such: lyr.minScale = 150000 For a label, one can manually set the scale range within a dialog in ArcMap. In arcpy, is ...
-1
votes
4answers
105 views

Issue with UpdateCursor and if/else statement

I have been working on this code for awhile and I can't make it work the way I need it to. The code is suppose to move a feature according to a set distance from types in a designated field. As the ...
0
votes
0answers
15 views

Error building pyramids/statistics on raster with arcpy

I am building a script to process rasters with the option of adding the extra step of building pyramids and statistics at the end. For some reason, it will not recognize inputs as legitimate raster ...
0
votes
1answer
27 views

arcpy.ListDatasets() returns emtpy list

I'm having trouble getting the ListDatasets (or any of the list functions) to return anything but an empty list when pointed at our SDE geodatabase, but the same code works for a file geodatabase. I ...
1
vote
0answers
38 views

using arcpy to query sde database in python

I have three variables: view_name, column_name, and column_content. column_name contains id, name, address, etc. column_content contains 123, John, 200 King st, etc. user specifies the column_name ...
2
votes
2answers
31 views

Update raster value to reflect total number of points within cell- python

I have what should be a fairly simple task, but I can't seem to figure out how to do it. I have to do it in python/arcpy/gdal/whatever because I'm trying to automate this process for a hundred or so ...
3
votes
1answer
41 views

How to obtain the width and height of an image using arcpy

This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python. Is it possible to find an image's height and width using arcpy and ArcGIS? arcpy.Describe would seem ...
0
votes
0answers
26 views

How to intersect widget using script python arcpy and geoprocessing service? [closed]

Is it possible to develop an intersection widget with geoprocessing service using script python arcpy? I try to do that with ModelBuilder but after publishing, in geoprocessing service i don't find ...
1
vote
2answers
107 views

Import CSV column into existing feature using arcpy

My goal is to take a CSV that contains 50 rows and one column and import the data into a feature class with over 3,000 rows using arcpy. I want to pick a random row from the CSV and then iterate ...
0
votes
0answers
44 views

Intersecting Polygons

I have 10 shape files containing polygon features. I would like to produce a single polygon layer containing portions of the input polygons where no fewer than two of the aforementioned feature ...
3
votes
1answer
106 views

Multithreading in Arcpy

I am learning multithreading and thinking about using it with Arcpy. The example I am working on doesn't have much practical reasons. However, I don't know why it fails on the line ...
3
votes
1answer
88 views

Arcpy Update Cursor (arcpy.da.UpdateCursor()) not saving changes to 'SHAPE@LENGTH'

Looked around and found other Cursor questions, but nothing dealing with updating 'SHAPE@LENGTH'. I am running ArcGIS 10.2.1 and have a multipoint shapefile that I am grouping into polygons based on a ...
5
votes
1answer
204 views

Are there any distinct advantages of creating a Python Toolbox over a Custom Toolbox?

I enjoy making different geoprocessing tools to practice Python and to become more familiar with the arcpy modules. I've just been using a Custom Toolbox and then importing the Python script and ...
2
votes
1answer
51 views

Exporting an ArcGIS model to a script, with a script?

I would like to automatically export ArcGIS models to python scripts (and graphics for the model diagram). In order to apply version control to ArcGIS Models my current workflow is to: a) build and ...
3
votes
1answer
42 views

Keeping the Highest Valued polygon

I have a single polygon feature class that contains large polygons which represent signal strength. Often times these polygons overlap. I dissolve to get multi-part polygons with a value range of 3 ...
2
votes
2answers
57 views

arcpy.Dissolve fails; need a arcpy dissolve to multipart workaround

I have a arcpy script in which I am using arcpy.Dissolve on a single feature class with multiple features to get a single multi-part feature in the output. The script is successful only part of the ...
2
votes
2answers
34 views

How to specify service publication parameters with arcpy?

I publish map services on a ArcGIS server using the typical arcpy script below. I need to better specify some service parameters. For example, the service should be available in WMS instead of KML, ...
2
votes
1answer
80 views

How to generate landmark-based route description using ArcPy?

I am now using ArcGIS 10.1 and currently a beginner in ArcPy. There is a project requiring to generate landmark-based route description. I am wondering how to use a buffer to find the landmarks in ...