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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Update Data Driven Pages Index layer via Python

I am trying to find a way to update the index layer for data driven pages through arcpy. I understand that to access DDP from arcpy.mapping you need to be referencing a MXD that has DDP enabled. My ...
0
votes
1answer
26 views

Troubleshooting ERROR 000814: Invalid file type from arcpy.TableToExcel()?

I wrote the script below to iterate through a file geodatabase's feature classes and convert them to an excel table. However, it returns the error ExecuteError: Failed to execute. Parameters are not ...
-4
votes
0answers
40 views

Python script working incorrectly?

i am writing script which uses different Tools of arcgis and implementing different functionalities .. My script consists in different Functions running in an order. Each function is connected to ...
0
votes
2answers
21 views

ArcPy merge using a list from GetParameterAsText

I am pretty new to ArcPy so bear with me. I am having a hard time understanding how to feed a list of FCs from a "GetParameterAsText" into something like the merge tool. I have my GetParamterAsText ...
0
votes
1answer
3 views

Accessing bands in .pix (PCIDSK) file in python/arcpy

I am trying to perform zonal statistics on a single band from a multi-band raster in .pix format. I have things working great with a tiff file. I am able to access the bands using this code: desc = ...
0
votes
0answers
12 views

Intermittent exceptions in CopyRows_management

Occasionally, but frequently enough to be a pain, my script throws an error. The script runs fine most of the time but when it fails, I get this: Traceback (most recent call last): File "XXX.py", ...
0
votes
0answers
6 views

How to call the Manage Map Cache Tiles tool hosted by default in the system folder of arcgis server. I am getting ERROR 001428

When I am trying to call the GP tool Manage map service cache tiles that is hosted on the arcgis server by default in the system folder, I am geeting the followning error: ERROR 001428 Failed to ...
0
votes
1answer
28 views

Repair/Check for empty geometry in ArcSDE?

I understand that the standard validation/repair tools are not for use with ArcSDE and that ESRI needs to fix this, but are there work-arounds for at least checking where there might be empty geometry ...
0
votes
1answer
39 views

CSV to ArcGIS table, insufficient text field length

I currently use arcpy.TableToTable_conversion in order to convert a CSV file into an ArcGIS file geodatabase table. This works when string length is less than or equal to 255 characters. Whenever 255 ...
0
votes
0answers
14 views

Checking if Terrain Model has pyramids or data sources using ArcPy/Python?

I asked this question in the Esri forums and got nothing but a lesson on LAS point cloud classifications—not even remotely what I had asked. I’m hoping someone here can point me in the right ...
-1
votes
0answers
7 views

Add feature class from different geoodatabase to a single mxd [duplicate]

I need to add multiple feature class from different geoodatabase to a mxd and then change to same colour and making a definition query to it. The naming of all feature class are end with ppt. Is ...
0
votes
0answers
18 views

How to add multiple feature classes from gdb to mxd using ArcPy? [duplicate]

I'm using ArcGIS 10.2 and I am trying to to add multiple feature classes (eg. c101ppt, c102ppt, c103ppt... [name end with ppt] in a geodatabase to a mxd. The name of feature layer need to be the ...
1
vote
1answer
12 views

Changing Mosaic Dataset Properties in Map Document using ArcPy?

Does anyone know if it is possible in ArcGIS 10.3 for Desktop to access and change mosaic dataset properties within a map document using ArcPy? I am trying to write text into the symbology ...
0
votes
0answers
17 views

Select Visible Rasters (Mosaic Datasets) using ArcPy?

I am wondering if anyone knows if there is arcpy functionality available in ArcGIS 10.3 or can be coded easily to replicate the select visible rasters command (manually right clicking on a Mosaic ...
0
votes
0answers
20 views

Computing Area Weighted Average on Rasters Using Raster to Polygon

I am using ArcGIS 10.3 for Desktop. I am trying to compute area weighted averages for polygons in a shapefile using values in a single band raster data set. The approach I am taking is that I am ...
0
votes
1answer
18 views

Zonal Statistics as Table output is missing some polygons ONLY when run from Python script

I have a raster file from which I am attempting to calculate mean values for polygons defined in a shapefile. Using the Zonal Statistics as Table tool from within ArcGIS works great. My shapefile ...
0
votes
1answer
42 views

How to check for empty string?

I am running a loop to go through tables of a database's feature classes to rewrite the URL links that are currently in the records. The first elif statement is to check whether there is an empty ...
-1
votes
1answer
25 views

NumPy Array to Feature Writes only first array object to feature class

I am consuming a json web-service with NumPy Array to Feature, I have many nested try/except blocks to consume the data/find errors/etc. The script is functional, however I am having trouble seeing ...
3
votes
1answer
84 views

Can I project a single set of coordinates that are not in a table or feature class with arcpy?

I have been searching for the easiest way to convert a single set of State Plane Coordinates (in units of "Feet") to Decimal Degrees using arcpy. All the methods I have seen so far involve one of the ...
3
votes
1answer
98 views

Is there a quick way to see the fields in a table via arcpy?

I frequently find myself in Python debug mode, trying to examine the fields of a layer or table. arcpy.Describe(lyr).fields returns an array of <geoprocessing describe field object> which isn't ...
0
votes
1answer
18 views

How to publish the Manage map server cache tile (Server) tool as an arcGis geoprocessing service?

I need to publish the Manage map server cache tile on the arcgis server as a geoprocessing service. As a result I will be able to update the tiles of a tiled service through a service call. I face ...
0
votes
0answers
9 views

Problem with schema synchronization using Import Replica Schema (Data Management)

I want to synchronize the schema of replica. The steps I am following is documented in ArcGIS Resources: Export the geodatabase_1 replica schema using Export Replica Schema (Data Management) tool. ...
0
votes
1answer
57 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 ...
1
vote
1answer
47 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
19 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
24 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 ...
-3
votes
0answers
88 views

Getting value from arcpy.GetParameterAsText?

I have a point shapefile with the following columns mosaic hypo result condition 2000 1700 1500 1000 980 . . AND i want to write a script that will do the following: ...
1
vote
0answers
41 views

Automating creation of ServiceDefinition from Python toolbox of ArcPy without broken project data source?

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
24 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
19 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
31 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
45 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
41 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
48 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
32 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
47 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
177 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
21 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
34 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
3answers
39 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
24 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
43 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
23 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 ...