A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

2
votes
2answers
107 views

AttributeError: 'Layer' object has no attribute 'listLayers'

I want to use the result of OD cost matrix for my further calculations. However, whne I try to extract the sublayer "lines" it returnes an error AttributeError: 'Layer' object has no attribute ...
0
votes
0answers
76 views

arcpy UpdateCursor throws exception on geoprocessing service?

I wrote Python code that changes the state of a feature by ID. I am not using a Python Toolbox (.pyt). I wrote a python script and added it into a standard toolbox (.tbx). Using ArcGIS Desktop ...
0
votes
0answers
29 views

How can I get arcpy.TraceGeometricNetwork_management results? [duplicate]

I have geometric network and try to launch Python script with tracing gdb = "C:/Users/my_user/Documents/ArcGIS/gn/gn.gdb" gdb += "/gn/" geometric_net = gdb + "gn_Net" flags = gdb + "flags" ...
0
votes
3answers
85 views

Assign Mask From Layer in SearchCursor Loop In ArcPy: Error Accessing Environment

I'm trying to run a loop based on a SearchCursor that selects layers from an input polygon and polyline. I want to select a feature from the polygon to use as a mask for running Euclidean Allocation ...
1
vote
0answers
47 views

Rename a empty layer that has been added to a group layer [closed]

Originally I was trying to add a empty layer that was stored on disk. That contained no data. I created the empty layer , by making a group layer within my mxd and then saving it onto a location on my ...
1
vote
2answers
98 views

Count number of group layers or Layers inside group layer using ArcPy? [closed]

I am looking for a way of counting the amount of layers within a group layer I have an empty group layer inside my map and I am looking for a way of initiating a process if there are 0 layers inside ...
2
votes
1answer
69 views

Concatenating Attributes of Points in Same Location using ArcGIS for Desktop?

I have a single feature class that contains multiple points with the same location, but different names and text attributes, and I would like to concatenate the attributes together and merge the ...
1
vote
1answer
40 views

Iterating through list of fields using field calculator?

import arcpy, sys, itertools arcpy.env.workspace = r'path to geodatabase' fields1 = ['gearqty', 'cnemarea', 'fzone', 'qdsq', 'tensmsq', 'crew', 'nanglers', 'port', 'totalquant', 'trip_days', ...
1
vote
1answer
54 views

Find Feature class into another feature data

I am trying to find the feature classes from one feature data into another feature classes. But I'm getting nothing at the end as a result of the matc statement. The data in the arc environment is ...
0
votes
1answer
51 views

Getting NameError with PythEveryone in ArcGIS virtual campus module?

I'm working on the python for everyone lab in Esri's Virtual campus. I'm running into an issue that I can't seem to solve, I've already done some outside research hence posting here! The issue: 4th ...
9
votes
1answer
221 views

ArcGIS Pro and ArcGIS Desktop on same machine

I'm just trying out ArcGIS Pro for the first time and I had to change my PYTHONPATH to python34 ArcGIS Pro is now working without crashing every time I open the Analysis tab... However now when I try ...
1
vote
2answers
45 views

Writing value from attribute table to text element using ArcPy?

Is there a way, using ArcPy, to read a field from an attribute table and write the contents of that field into a text element? I have a point feature class with a field name called "Cities". I will ...
1
vote
1answer
89 views

Merge polygons in the same shape file based on attributes, ArcGIS or ArcPy

I have a shapefile of polygons. I do not want any polygons with an area less than 25. For polygons with an area less than 25 I want to merge them with another polygon with an area greater than 25 that ...
8
votes
1answer
164 views

In ArcMap, use python to disable “Scale map elements proportionally to changes in page size”

I am changing sources on MXDs in differents offices using ArcPy and ArcGIS 10.0. As observed here, the printer settings revert to the default printer when the instruction mxd.save() is sent. Losing ...
0
votes
1answer
46 views

Is it possible to run ArcGIS 9.3 python script for ArcGIS 10.3? [duplicate]

I need to translate python 2.5 script for ArcGIS 9.3 to python 2.7 for ArcGIS 10.3. Our office has now all computers with ArcGIS 10.3. So, I need to translate these scripts to arcgis 10.3. Could ...
2
votes
2answers
82 views

Bulk selection by ObjectID using arcpy

Trying to bulk update versioned Feature Classes containing in excess of 30,000 records is causing issue due to the Reconcile/Post process taking too long and ending up with the notice saying that the ...
2
votes
1answer
20 views

How to skip ArcOnline MXDs(ArcPy)

I've previously posted a question about an ArcPy tool that walks through a specified area and scans all MXDs and associated Layers and reports them (as well as the inverse) Search for a shape-file of ...
2
votes
2answers
49 views

Why does psycopg2 “SELECT ST_AsBinary(geom)” return “<read-only buffer…>”?

I'm trying to retrieve polygons out of a postgresql database and I'm running into several problems. First, I've been able to get ST_AsText(geom) to work in conjunction with arcpy.FromWKT(), but the ...
10
votes
2answers
400 views

Create area buffers that are limited by a coastline

I'm trying to use ArcGIS 10.2 to create a buffer of points based on a pre-defined area (e.g 400 sq km). Further to that, the buffers of some of the points are close to the coastline that requires the ...
0
votes
1answer
52 views

Select by Location using first points of polyline

I am trying to select a point from a point layer that intersect a polyline layers firstpoint and using arcpy. I am getting an error "ExecuteError: ERROR 000622: Failed to execute (Select Layer By ...
1
vote
1answer
50 views

Can I make my zonal analysis faster?

I created this python script which performs zonal analysis for the 100m, 200m, 300m, and 400m surrounding a list of points. It works but I have two main problems: A) The raster I am processing has ...
0
votes
0answers
64 views

How to get a calculated sum as dynamic text in ArcMap 10.3 text element?

I am trying to get the sum of the length field from my attribute table into a dynamic text element for display purposes in layout view. I have put together a python script to get the sum of the field ...
1
vote
0answers
34 views

Arcpy 64 bit, or multiple Python installs? [duplicate]

I am new to Python, and am trying to write a script that would upload a geodatabase to AGOL at a scheduled interval. However, the 32 bit distribution of Python cannot handle the file size (over 1 MB), ...
3
votes
2answers
95 views

merge dbf files - without using arcpy?

I have ~7,000 2 line dbf files (zonal stats output) that I would like merged into one table, all the same format. I have used the arcpy merge tool, as seen below. #merge tables together ...
3
votes
1answer
221 views

How can I install pyproj into arcpy?

I am trying to install pyproj. I downloaded the zip folder on this page pyproj. Then I copied it to C:\Python27\ArcGIS10.3\Lib. However, when I try to import the module, I get the message ...
4
votes
2answers
86 views

How to prevent arcpy from adding new features to current workspace

I have the attached code. The code takes a huge raster, and a set of point features. For each of them creates a circular buffer (100), then squares it, and then clips that part of the buffer. In doing ...
0
votes
1answer
61 views

How to Batch Export MXD to GIF using Arcpy

I am trying to batch export several MXD files into corresponding separate GIF files. I am using the script below but am not having much luck and am getting an error: 'Invalid MXD filename' import ...
0
votes
0answers
25 views

Creating Changing Drop down list in Validation

I am trying to make a changing dropdown menu from a value list I have set in my tool through validation. If I were to change one value in the script, the value list will only grab values that pertain ...
0
votes
1answer
28 views

Using Model to define a group/range of numbers then populate a new field with the new definition

In one single table I have a rank in one field, and let's say I have rank 1 through 3 in one field and I want to define that group of rankings of 1,2 and 3 as having a score of '10', then ranks 4 ...
1
vote
1answer
80 views

ArcGIS REST API: using /addItem with secure service

Using the code below I am adding 100's of Map Services to a portal instance. The script successfully runs and adds them however the services are secure so I would like portal to store the username ...
0
votes
0answers
34 views

Why does the Legend vanish when exporting MXD to PDF using ArcPy?

I try to export multi MXD files into pdf. The code run without an errors, but the problem is that the legend vanished from several pdf files: import arcpy,os import arcpy.mapping from arcpy import ...
1
vote
1answer
85 views

Optional Parameter becoming required in ArcPy?

I would like to make a python script (.pyt) where i have 2 input parameters: If the first parameter (which is a boolean) is set TRUE, therefore it is checked, the 2nd parameter should become required ...
3
votes
3answers
123 views

Multi MXD export excluding specific MXD using arcpy

I try to export multi MXD into pdf files, but i want to exclude specific MXD files from this action: import arcpy,os import arcpy.mapping from arcpy import env env.workspace = r"D:\desktop\Project" ...
0
votes
0answers
19 views

Selecting predefined ArcMap template using ArcPy? [duplicate]

i have managed to create script for search cursor which will replace the text element in one of the template from help provided from my previous question Replacing text.element from feature class ...
2
votes
2answers
120 views

Update cursor for joined field

I have a huge point vector data (around 3 million point; in a gdb) with attributes and I have table (created with Near analysis.). I want to copy one of the field values to data. So I joined the table ...
0
votes
1answer
126 views

Using Update Cursor to update all fields in a feature class based upon another feature class

I have perused GIS stack exchange to find an answer, but haven't quite found what I am looking for. Question: I am trying to update all the fields in a feature class based upon field values from ...
1
vote
1answer
109 views

Issue with arcpy.MakeFeatureLayer_management in tool

I have created a python toolbox that creates separate layers based on unique field values within a feature layer. For some reason arcpy.MakeFeatureLayer_management will create the layer but will not ...
4
votes
1answer
64 views

Making output table of Python script tool be intermediate file to another model?

I have created a Python script tool using ArcPy. It has a File Geodatabase Table as output. I want to add the script to a new Model in ModelBuilder in ArcMap. The Table output should be an ...
1
vote
2answers
67 views

ApplySymbologyFromLayer_management Overwrites Graduated-Color Class Break

My goal is to generate any number of MXD files with custom class-break-values using a consistent, pre-defined style. For example, in ArcMap (10.2.2 and 10.3.1), I have an MXD with a graduated-color ...
1
vote
0answers
32 views

Python's logging module not working with ArcPy [duplicate]

I have a Python script imported to an Arc toolbox. It uses Python's logging module for message recording. import logging import time import os, sys import arcpy ...
1
vote
1answer
76 views

Text field character length optimizer

I need to automatically optimize text field character length to their current largest attribute character count. For example the field "MyName" is 250 characters long, but has attributes that are a ...
1
vote
1answer
146 views

Clip analysis in ArcPy?

I have one shapefile that covers an entire city. I also have a list of 100 shapefiles which are buffers in different places in the city. Now I want to clip for each buffer from that city using ArcMap ...
1
vote
1answer
234 views

Using PyScripter with ArcPy: “import error, no module named _base”

I'm trying to use ArcPy in PyScripter. I don't have admin privileges on this computer (it's my work computer) so I have to use a portable version of PyScripter. I'm sure my boss would let me install ...
1
vote
1answer
40 views

Updating null values in appended feature class

I am creating a customized script tool that first clips out a line feature from one feature class, dissolves the fields of the clipped feature class so that just one feature is in it, appends the ...
1
vote
1answer
79 views

Deleting feature classes from a geodatabase using arcpy.ListFeatureClasses()

Following up on Using FeatureClassToFeatureClass from list to concatenated list? The error I get is "Parsing error SyntaxError: invalid syntax (line 10)". Using the methods from above I am unable to ...
7
votes
2answers
219 views

Installing an ArcGIS add-in on several PCs

I usually do my python scripts and add them to ArcMap in the form of add-ins. First I launch the ArcGIS Python Add-In Wizard, create a project, a toolbar and the tool. Then, every time I do an ...
2
votes
2answers
87 views

Arcpy 10.0 using update cursor completes but ArcGIS crashes

I'm using an update cursor to iterate through my feature class, create a selection and then delete the row if it meets the condition. It partially works - I get no error messages and the script ...
2
votes
0answers
38 views

Extracting Mean from Raster and Writing to Table in ArcPy?

I am simply trying to extract the mean of each raster within a geodatabase and write the value to a table. I have done this successfully with another set of rasters, but now I keep getting the ...
0
votes
2answers
37 views

Using FeatureClassToFeatureClass from list to concatenated list?

Have many feature classes in geodatabases and eventually want to run more complex processes on them. Having trouble with the basics - can anyone tell me what I am doing wrong with the following? If I ...
1
vote
0answers
48 views

How to parameterize query sent with arcpy.ArcSDESQLExecute class [closed]

I have been developing a geoprocessor which takes user inputs as strings to develop a dynamic sql statment sent to MSSS from an ArcSDESQLExecute class. The app will only allow for controlled input, ...