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

learn more… | top users | synonyms (1)

1
vote
0answers
14 views

Parameter Not Being Included in Tool

I have been attempting to make a tool with four different parameters. My code consists of the following: def getParameterInfo(self): """Define parameter definitions""" # First parameter = ...
2
votes
2answers
34 views

Use updatcursor to replace values in multiple fields

I have spent a couple days digging through forums here, ESRI help and elsewhere and each variation of the codes I have tried has not worked. As best as I can tell this is due to my attempt to loop ...
1
vote
2answers
65 views

Calculate Fields with Null Values using the data update cursor using ArcGIS 10.1 sp 1

How do you calculate fields with null values? I have multiple fields that may have null values, that aren't being calculated in the third field. import arcpy with ...
3
votes
1answer
12 views

add-in to open automatically "data frame properties

How can created an ArcMap Python add-in using ArcGIS 10.1 to open automatically data frame properties And change the background color of another?
1
vote
1answer
25 views

Appending feature classes from one geodatabase to another geodatabase for python

I am attempting to write a stand alone python script which will loop through the first GDB and append each feature class to its corresponding feature class in the second GDB. The error code that I ...
3
votes
0answers
17 views

Get value from Metadata in Python Script for attribute

I am working on a python script to create some feature classes from dbf tables. As part of the script I would like to pull two values (FGDC "publication date" and ArcGIS Spatial Reference ArcGIS ...
1
vote
2answers
27 views

How to provide a default value in an arcpy script?

How do I provide a default value like recommended in every Arcpy script? This script is exported from ModelBuilder where every output except the last one is set to temporary and managed. I want this ...
2
votes
1answer
42 views

How to extract polygons from a road network?

I need to extract faces (or polygons) from my road network and calculate their areas. I mainly use Arcpy packages but even if you know it in QGIS APIs, I'd appreciate if you'd share it with me. If it ...
2
votes
0answers
18 views

How do you perform the equivalent of the Esri Identity_analysis (line with poly) with PostGIS?

I've got a section of arcpy code that I need to port PostGIS: Identity_analysis with the in_features being a line featureclass and the identity_features being a polygon featureclass. I'm primarily ...
1
vote
1answer
17 views

Issues with FME and the ArcInfo licence

I have ArcInfo 10.2.1, Python 2.7 and FME 2013 SP4 installed on my Computer. I want to run a python script I exported from ModelBuilder (where it ran without issues) and imported in FME as shutdown ...
1
vote
1answer
220 views

Query Layer not found ERROR 000229

My code executes in three steps: create FeatureLayer, create QueryLayer and join QueryLayer to FeatureLayer: arcpy.MakeFeatureLayer_management(**{ "in_features":features.get_dataset_fullpath(), ...
1
vote
1answer
12 views

buffer by objectid in arcpy

is there a way in Arcpy (arcgis 10.2.1) to buffer lines by selecting thier objectid? arcpy.Buffer_analysis("MY_JUNK","d:/data/ArcGIS/Default.gdb/MY_JUNK_Buffer1","10 ...
0
votes
1answer
7 views

ERROR 000539: Error running expression_NameError: name 'shape title' is not defined

I'm trying to get the title of the shapefiles or feature classes that are in a workspace (folder or GDB), into the field as a Name in python. I know this is easier in modelbuilder by adding %Name% in ...
1
vote
1answer
18 views

How to Set Label Expression Using a Long Field Type in Toolbox

What I am hoping to be able to achieve with this Tool within my Toolbox is to allow the user to input a number of layers and to set all of the labels with the same font settings (font style, color, ...
0
votes
2answers
42 views

arcpy calculate string field: Any ideas what how to fix this?

I'm trying to store a string value obtained from a loop through a tuple into a field called ROW_1. The code goes like this: for creekclass in listOfClassTuples: (classname, Permanency, ...
1
vote
2answers
68 views

How to create a new field with a combination based on another field with arcpy?

I like to create a new txt which has two columns: Id and GRIDCODE. This is the original Table: The Id column of the new txt should have just unique values. I’m able to do this with the following ...
2
votes
2answers
448 views

Clip_management to raster extent outputs larger raster than raster extent

Using Python and ArcMap 10.0 SP5, I'm trying to reproject and clip a large input raster to exactly the same grid as a smaller target raster (same extent, pixel sizes and projection). The problem is ...
2
votes
1answer
42 views

How can you alter label styles (font, color, size, etc.) using Python scripting? (ArcGIS 10.2)

I am trying to write a python macro that will automate the process of labeling points in a layer based on different types of apartments. For example, one style of apartments would have a blue square ...
2
votes
2answers
38 views

Python Tool Not Opening

I know that this is definitely an ambiguous question. However, I initially had my Python toolbox working great. I then wanted to have additional functionality with it and added some more coding. ...
1
vote
0answers
33 views
+50

How to print log from FME when run from python script?

I created a Spatial ETL ToolBox in ArcCatalog. When I run the tool from ArcCatalog I see log massages. But when I run this tool from a python script, the logs do not print to the python console. ...
0
votes
0answers
24 views

mxd.saveACopy(outMxd) not working

Getting an intermittent error. I'm opening an MXD, modifying, and then trying to save out with a new name. I think it's because the output MXD name is similar to the input MXD name. Note that I ...
0
votes
0answers
31 views

Facing difficulty in saving an output to CSV [on hold]

After implementing the code published by Jason in this answer to How to list feature classes in multiple geodatabases in a folder?, I have received an output like this: ...
0
votes
1answer
41 views

Avoiding ImportError: No module named numpy?

When I try to import ArcPy, I get the following message. Any help would be appreciated.
0
votes
1answer
115 views

Python in ArcGis, cannot find what is wrong with my syntax

I am using Feature class to Feature class to batch convert some .dwg files. However python does not like the last statement (name). It's probably something very simple, any idea where I'm going ...
3
votes
4answers
272 views

Having trouble with 'and' 'or' statements and negative numbers

I have set up a program that calculates the relationship between a point and the first point of a polyline. The aim of the program is to run this calculation and then copy the result to a certain ...
-2
votes
1answer
51 views

Exporting file geodatabase (GDB) to Folder of shapefiles?

I have a geodatabase with several feature dataset and feature classes associated with it. I want to export each feature dataset as folder and feature classes associated with each feature dataset will ...
4
votes
1answer
869 views

Script tool Value ERROR 000735: Output Layer: Value is required?

I've been struggling to get my script tool to run without receiving the following error: <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000735: ...
12
votes
1answer
3k views

Fastest way to count the number of features in a feature class?

With the introduction of the Data Access module in arcpy (30x faster search cursors), I want to know if counting features matching sql criteria is faster than the traditional MakeTableView + GetCount ...
2
votes
2answers
28 views

Preventing ArcPy from changing MXD extent?

I want to process mxd datasources without changing the extent. When I open the MXD in ArcMap and click full extent, I get 1:214,890, after I save and re-open in ArcMap I get what I saved with. ...
2
votes
1answer
934 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
0answers
12 views

Kriging Interpolation of Daily rainfall data using ArcPy?

I want to perform the interpolation of daily rainfall data for 7 years. I am now working on python using arcpy module. I face several problems while performing interpolation Some day there is no ...
0
votes
1answer
157 views

Polygon Neighbors Analysis script (ArcPy 10.1) producing erroneous results?

I'm struggling with a python script that is supposed to calculate a field for a polygon feature class. The calculation is of the average of a field value (P_TOT_DEV) for each of a given polygon's ...
1
vote
1answer
37 views

Export Multiple Raster Data with custom Cell Size

I Have 172 Raster, and need to change the cellsize. So I use Export Data from TOC and change the cellsize manually (example I want to change it to "3") I tried using this python script to ...
1
vote
1answer
16 views

Changing order of parts in multipart geometry using ArcGIS for Desktop (or ArcPy)?

Is it possible in ArcGIS to change order of the parts in multipart geometry? In the context menu i founded "insert before" , "insert after" but it never comes active ... or is it possible via ...
5
votes
1answer
33 views

PySAL natural breaks from Numpy array

I am attempting to extract natural break values from a raster using Python. The intended process goes: Arcpy raster object to NumPy Array (using RasterToNumPyArray) to natural break values (using ...
5
votes
2answers
244 views

Error 000725 message from output workspace when using Python (ArcPy) script tool?

I am having trouble running a script tool that I just created in Arc 10.1. The script runs fine in PythonWin, but when I create a script tool with it, the tool seems to not want to accept folders or ...
1
vote
0answers
11 views

Error 000725 importing Python (Arcpy) script into tool of standard toolbox? [duplicate]

I have created a Python script. When I run the script as a standalone by make this a hard set path instead of sys.argv1, the script really runs fine. When I import this script as a python tool box ...
1
vote
1answer
11 views

Including NoData zones in zonal statistics table

I am running the zonal statistic tool on a raster with a shapefile that consists of several regional polygons. I would like the zonal statistic to include the regions that are completely NoData in the ...
4
votes
1answer
573 views

Iterative position within Field Calculator/Python

I'm not great with Python or programming in general, so I'm not even sure how to ask this question. Basically what I've got is in the left column, and what I want is in the right column. UniqueID ...
1
vote
1answer
51 views

Importing file geodatabase (GDB) to table of contents (TOC) of ArcMap?

I have a geodatabase with several feature dataset and feature classes associated with it respectively. I would like to create a .mxd where the Table of contents consist of group layer and each group ...
1
vote
0answers
22 views

User input and passing variables with ModelBuilder

I have created three modelbuilder tools that must be run in sequence. After running each tool, the user must examine several shapefiles and potentially change the input parameters of the next tool. ...
1
vote
2answers
45 views

Select points within a polygon and update attributes

This seems really simple but I can't get it to work. I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales ...
1
vote
1answer
57 views

List all Feature datasets & feature classes from a single geodatabase into CSV

I have prepared a python code and I got the following errors: "Parsing error IndentationError: expected an indented block (line 11)" and "Runtime error Traceback (most recent call last): ...
2
votes
1answer
55 views

Using ArcPy to ungroup group layer in MXD?

I am looking for a way to ungroup a group layer using arcpy... (instead of having to open the mxd and right-click on the layer to choose "Ungroup"...) mxd = arcpy.mapping.MapDocument(pathToMyMxd) df ...
3
votes
1answer
1k views

Creating empty group layer within existing group layer using arcpy.mapping?

Referencing this question, Add a new group layer with python ArcGIS 10, I'm trying to use python to add a empty group within a group layer. So far I'm able to add a empty group within the map ...
0
votes
0answers
43 views

Exporting table of contents (TOC) with group layers to file geodatabase (GDB) with feature datasets?

I have created a python code for exporting shapefiles from TOC from different source folder to a output folder. However, in this case, I have some group layers in the Table of Contents (TOC). ...
-3
votes
0answers
31 views

Exporting group layers from Table of Contents (TOC) to Folders of shapefiles?

I have some group layers in the Table of Contents (TOC). Each group of layers references a few shapefiles from different source folders. I would like to export each group layer name as a folder and ...
-3
votes
0answers
26 views

Transformation of Feature dataset list [closed]

I have a input.CSV file and first column consists list of feature dataset and input.csv consist of 5 rows and 1 column. EMI_EMF Cultural Resources Hazardous Materials Parcels Footprints Now I ...
1
vote
0answers
36 views

ArcPy on 64 bit Windows [duplicate]

I can't import arcpy into 64 bit Python. It works just fine in the python install from arcGIS, though. When I try to import it elsewhere, I get this error: Traceback (most recent call last): File ...
2
votes
2answers
1k views

Looping through list of shapefiles to rename them using ArcPy?

I am trying to upgrade a simple script to list all shapefiles in a folder and if necessary in any folders within and then loop through the list of shapefiles and rename them. import arcpy # Set ...