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

learn more… | top users | synonyms (1)

0
votes
1answer
44 views

How to automate ArcGIS map production using Python?

I have this layout; it's a map that I divided it to 25 parts using FISHNET from arctoolbox. I want to prepare only one layout and then using a Python script I want to be able to automate the ...
0
votes
0answers
21 views

Find the next number within field [duplicate]

I have a massive point feature class with a string field of a unique value. The string has 2 unique letters and 5 numbers starting at 00001. Every time a point is added I need to find the last number ...
1
vote
1answer
36 views

How do you use Windows folders as acrpy Parameters

I am having problems trying to perform simple folder management operations in an ArcGIS python toolbox. First here's some code snippets (I have left out all of the stuff that does not pertain to this ...
0
votes
1answer
14 views

Repairing a broken data source for a single layer in multiple map documents

I am a Python newbie and I'm trying to repair the data source for an aerial raster in close to 50 individual map documents. My supervisor deleted the 2014 recently and uploaded the 2015 in its ...
0
votes
1answer
21 views

Re-Calculating Rows in File GDB Feature Classes

I run the script that I created below, but when it is completed and I check the FC tables, nothing has changed. The script iterates through each feature class of a database and then iterates through ...
1
vote
0answers
33 views

ESRI arcpy - Automating the creation of a ServiceDefinition from a python toolbox - missing data

Summary: I can create a ServiceDefinition through ArcCatalog or ArcMap, but when I try to generate the ServiceDefinition through python, it does not copy the /data folder with it, thus the script ...
0
votes
1answer
18 views

ERROR 000157: Input and target dataset should have the same number of bands. Failed to execute (MosaicToNewRaster)

This is just a continuation of my former post:Batch Mosaic Rasters: arcpy.MosaicToNewRaster_management (ERROR 000628: Cannot set input into parameter coordinate_system_for_the_raster) --where I batch ...
1
vote
1answer
24 views

why there is no attribute like 'GetNAClassNames' in my arcpy

I want to do a network analysis, when I want to load a layer as a barrier using arcpy.na.GetNAClassNames, the message is like this: AttributeError: 'module' object has no attribute 'GetNAClassNames' ...
0
votes
1answer
18 views

Batch Mosaic Rasters: arcpy.MosaicToNewRaster_management (ERROR 000628: Cannot set input into parameter coordinate_system_for_the_raster)

I am trying to batch mosaic rasters using arcpy.MosaicToNewRaster_management in arcpy: #This is for mosaicking a lot of rasters import arcpy from arcpy import env ...
-1
votes
0answers
30 views

Using ArcPy to display result shapefile with layer symbology?

I am using an ArcPy script, and everything is working perfectly except the display of the result shapefile file. What is the best solution to display the result? In the end I would like to share ...
0
votes
0answers
38 views

Creating a custom toolbox and python script to analyze fire data

My goal is to create both an ArcGIS toolbox and an independent python script to do the analysis of fire occurence in the Southwest (by season) through ArcMap as well as independently with python. I ...
0
votes
1answer
32 views

Failed to execute (RastertoPolygon) Syntax error at or near symbol SPACE

I'm converting series of raster to polygon using RastertoPolygon in arcpy. #import the module import arcpy from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") ...
1
vote
2answers
36 views

How to generate random points from FIDs using ArcPy or ArcGIS Field Calculator?

I'm trying to generate a shapefile of random points using FID from the attribute table. My attribute table has 800,000 features and I only need a sample of 240. Is there a way to do it in arcpy or in ...
-2
votes
0answers
46 views

Installing ArcPy on Mac?

I want to use an answer from Batch shapefile merge, with adding and calculating field to create a merge of 50 shapefiles but I only have a Mac. Is there a way to install ArcPy on my Mac so I can ...
2
votes
0answers
27 views

Scripting Address Coder actions in ArcPy?

I am currently using ArcGIS 10.3 for Desktop that comes with the "Address Coder" tool. This tool has some features that I need as part of my geocoding requirements: in specific, the option to append ...
1
vote
1answer
45 views

Add and Calculate Field in Table with ArcPy?

I have written the following script to iterate it as a tool for all my tables with ModelBuilder, but i have a problem wth my codeblock. I want to add a field FID to all my tables and to add the values ...
3
votes
4answers
170 views

Removing first and third zeros of a fieldname in label expression

The fieldname only has three characters. I dont want to display zeros in the first and third values. example below. 010 = 1 100 = 10 01Y = 1Y 10Y = 10Y I have figured out how to strip out zeros ...
1
vote
2answers
54 views

How do I tell if arcpy is installed?

I have a user that recently received a new machine with a fresh install of 10.2. We have a python / arcpy application that worked in 10.1 on the old machine but does not work on the new machine with ...
0
votes
1answer
18 views

How does GIS detect the error causing field in “ExecuteError: ERROR 001156”

I always get all types of errors, and would like to know if i can use the information in these error messages generated by arcpy to fix the issue and repeat the step where it occurred. for example in ...
0
votes
1answer
29 views

How can I add a custom toolbox to ArcMap, and see its script?

I'd like to add a custom toolbox to ArcMap, and also see the script it's written in. To do the latter, I'm trying to open it with my python editor, but it doesn't open it.
2
votes
2answers
32 views

Skipping an iteration in modelbuilder

So I've been assigned to clean up someone else's model. Here's the situation. The model is supposed to iterate over a few hundred folders containing feature classes and convert the contents into ...
1
vote
1answer
22 views

ArcGIS 10 ToolValidator - Empty feature class and feature class within declared feature dataset

I'm new to ToolValidator for a script tool and I'd like to make two checks which then adds an error if either rule is violated. I need to make sure parameter 2 and 3 (feature classes) are within ...
0
votes
1answer
41 views

Batch merging field mapping

I made the following script to merge shape files of different format types (poly,line, points): def main(): import arcpy from arcpy import env import globalpath import os ...
2
votes
4answers
62 views

How to create new feature classes from rows in a polygon feature class

I'm trying really hard here to get an arcpy equivalent for ARCGIS' ModelBuilder's Iterate Feature Selection. I need to export the individual polygon rows in a feature class as new feature classes. ...
0
votes
1answer
31 views

AttributeError: __exit__ when trying to use arcpy.UpdateCursor

I'm trying to populate a field from values of an existing field in a feature class using arcpy.UpdateCursor. I'm getting this error: AttributeError: __exit__ Here's the chunk of code I'm ...
0
votes
0answers
43 views

Why do I get 0 with calculate field in my script?

My Script: #Define parameters input = sys.argv[1] major_axis = sys.argv[2] minor_axis = sys.argv[3] azimuth = sys.argv[4] #Add XY to point data arcpy.AddXY_management(input) #Add major axis, minor ...
1
vote
1answer
20 views

Multiply two lists of raster from two subfolder

I have two subfolders, which contains rasters for each country but which express different variables. I am trying to figure out a way to Loop a multiplication of each raster into a folder with its ...
0
votes
0answers
22 views

Error 000192 in Make VRP with Python scripting in ArcGIS 10.3

I've written a piece of python code in ArcGIS 10.3 for applying VRP. pretty similar to sample code in Esri resource website. But, it gives an error: ERROR 000192: Invalid value for Time Impedance I ...
2
votes
2answers
40 views

Reading next row of *.txt column inside ArcPy for loop for batch process?

I'm not sure how to approach this problem with python, but in plain english, I'd like to rename rasters with the names given in the *.txt file (see screenshot) and concatenate the basename given by ...
0
votes
2answers
32 views

How do I change the color and trasnparency of a layer using arcpy?

I would like to create an arcpy script to change the color and transparency of a collection of layers. The color and transparency would be based on wildcards such as "_dog" or "_chicken". The layer ...
0
votes
1answer
39 views

UnicodeDecodeError: 'utf8' codec- arcpy

I work with arcmap 10.3 and python 2.7.8. I have more than 500 shapefiles that located in many folders and subFolders. All Sub Folders are located in one large directory. I try with arcpy to detect ...
1
vote
1answer
60 views

Simple Folder to folder batch python script

I am writing script to take shape files from a folder to Buffer it to given distance to Output folder with same name as input files. Here are block of codes. # Name: Buffer_multiple file.py # Usage : ...
0
votes
1answer
95 views

Using Python function in ArcPy script?

I have an script to transform DN into Reflectance of each band of several images. The unique variable of the equation, apart of the Band itself, is the Divisor: (B1 - 1) / 508 (B2 - 1) / 254 (B3 - ...
0
votes
1answer
14 views

Auto adding map elements using ArcPy? [closed]

I am very new with Python scripting in ArcGIS Desktop. Just wondering if there is a way to auto add in map elements?
0
votes
1answer
22 views

Valid input for ArcPy raster to polygon in 10.1?

I'm experiencing some strange problems with this code starting from files with *.tif.tif to what seems should be *.tif.tif.shp according to the code. The code is not working because of the ...
0
votes
1answer
24 views

When using “arcpy.gp.Int_sa” in Arcmap 10.1, what do I need to import?

My Arcpy code is not working because an error with the last line: Error 000824: The tool is not licensed. I have all my extensions turned on, so I don't know why I would be getting this error. It ...
0
votes
1answer
94 views

Using Python script tool in ModelBuilder?

i have created the following tool to add two fields in a table and do a calculation in order to put the tool to ModelBuilder. For some reason when i am going to put it as an input in an another tool ...
0
votes
2answers
38 views

Geoprocessing tool default path access every one?

I am using Geoprocessing tools i have face one problem with default gdb access in my system (default gdb means C:\Documents and Settings\\My Documents\ArcGIS\Default.gdb ) how can access different ...
0
votes
1answer
20 views

Debugging AttributeError: 'Result' object has no attribute 'save' from ArcPy script?

I Keep getting this error message when i run the code below, can anyone tell me why? Error message: Traceback (most recent call last): File ...
1
vote
1answer
26 views

How apply error messages to a python toolbox that prevent my tool from running with bad parameters?

This is a continuation of my question here: Point and Polyline I tried making this question easier to follow. My tool accepts two main parameters - a continuous centerline and a table (or a feature ...
-1
votes
1answer
30 views

I want to reclassify a raster in one folder, rename it and put it in new folder using Python

I've been combing stack exchange and I cannot figure it out. I have a raster "slope_tif_18TXK030910", I want to reclassify it, rename it and put it into a new folder. this is what I have and it works ...
-2
votes
0answers
12 views

Cannot assign name to resultant terrain using ArcPy so cannot save result? (posted again) [duplicate]

Question of python in ArcGIS: I can not assign a name to the resultant terrain, thus I can not save the result. I'm new to arcpy. By a piece of script using SetNull() in Raster Calculator, I want to ...
1
vote
0answers
14 views

ArcPy arcpy.gp.ExportMapServerCache invokes error: A secure connection with this site cannot be verified

What worked last week on many computers no longer works this week. My great ArcPy script gets a users current display extent and invokes gp.ExportMapServerCache to copy a web cache locally. It was ...
0
votes
0answers
25 views

UpdateLayer & ApplySymbologyFromLayer_management doesn't seem to be working

I have been trying to update the symbology of my raster layer file but nothing is happening. I don't get any error messages from using updateLayer or ApplySymbologyFromLayer. It also printed ...
-1
votes
0answers
41 views

Add layer label using ArcPy

I want to show 'ID' of each polygon in a shapefile using arcpy in data view mode. It should be fairly simple but not been able to figure it out. Any lead would be helpful. mxd = ...
0
votes
0answers
35 views

Why do Python scripts on scheduled task fail intermittently with various exceptions? [closed]

I have several Python scripts which are set on a task scheduler to run around 7 or 8 times a day between the hours of 1:30PM-5:30PM every half hour. The output from the script is an email with the ...
0
votes
1answer
32 views

Populating an attribute inside a loop

New to python scripting. One of the issues I have been working on is trying to get a script to calculate the elevation gained in each stream section based on a single input and the knowledge of the ...
1
vote
1answer
24 views

Loop through multi-input list/selection?

I'm back with a script I've previously posted about that I'm constantly improving. Below is a working script that is connected to a database with 52 feature classes on a server that, when having user ...
0
votes
1answer
48 views

pythonaddins module

I've posted this question on GeoNet 4 days ago. At the moment I've received no answers and no comments so I thought I'd try here as well. https://geonet.esri.com/activity#nPLoc=/inbox I have a tool ...
0
votes
1answer
30 views

How to convert date field value returned by REST API to correct date? [closed]

I performed a query on this USGS feature service of Airport locations: Click for query And the value for the field LOADDATE is: LOADDATE: 1411380301000 However, when I pull the layer into ArcMap, ...