Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Scheduled Python script arcpy.SpatialJoin_analysis line of code resumes only when I log into the machine

I have a python script (scheduled by windows scheduler) on a desktop I remote into. all lines of code execute without me being remoted into the machine except when it gets to this line of code below ...
dml0969's user avatar
0 votes
2 answers
193 views

Select MAX values within records with the same name

I have some polygons with same name and different area. I want to select each polygon by name (FARM_ID field) with maximum area. For example, I want to select polygons "SCAPD04-1" with ...
tamara's user avatar
  • 63
1 vote
0 answers
225 views

Creating TIN using ArcPy

I am attempting to creating a TIN using arcPy. When I try, I receive an error saying "The value is not a member of . Failed to execute (CreateTin)." Is there any solution to fix this? I am ...
user204111's user avatar
2 votes
1 answer
235 views

Using ListFields in ArcPy with ArcMap

I am having trouble getting the List Fields function to work. I need to search through a number of shapefiles located in different folders to list the fieldnames so I can see what are common naming ...
Tom Piggott's user avatar
1 vote
1 answer
97 views

Assigning multiple Customize keyboard shortcut keys for ArcMap

I am using ArcMap 10.1 and 10.2.1. I have attached the below image for reference. I want to assign multiple Customize keyboard shortcut keys at the same time. Is it possible do this using ArcPy/...
Amar's user avatar
  • 11
3 votes
1 answer
1k views

Updating ValueTable parameter of ArcPy Python Toolbox tool

I have a shapefile and I want to calculate multiple fields using the GP ValueTable parameter. The script loads field names from a layer, then I should delete rows I don´t want to calculate and then I ...
jonlew's user avatar
  • 451
1 vote
1 answer
748 views

Check if listed fieldnames are in shapefiles

I have one main folder and it has multiple sub-folder. Each sub-folder has one shapefile. I want to check some attribute field names like PLACENAME, GNIS_ID, which are present in all the shapefiles or ...
Emtiaj Hoque's user avatar
1 vote
1 answer
225 views

Exporting to GeoTIFF from data view with Data Driven Pages and ArcPy

I'm trying to work with ArcGIS Desktop with this problem. I need to export a data to geotiff with specific boundaries which are polygons, so i decided to use Data Driven Pages (DDP). Because there is ...
SZYM's user avatar
  • 11
0 votes
1 answer
98 views

ArcPy to select by location not showing selected features in attribute table

I have a button where it first calculate no of features in a specific layer and then runs the "are_identical_to" and update "D". After that it checks if the no of counts in two layers is same? If not, ...
Keshav Sharma's user avatar
0 votes
0 answers
42 views

Creating raster from grid algebra expression using point attribute values?

I have a point shapefile representing groundwater production wells with annual pumpage values distributed over a general area. I'd like to create a raster layer with each cell representing the ...
Devon Moore's user avatar
1 vote
1 answer
62 views

To update Point location every 1 second

I am using update cursor to change the location of a point with FID = 0 every second, but whenever I run the code my ArcGIS freezes and point doesnot move. I am visualizing an output where the point ...
Nemi Bhattarai's user avatar
0 votes
1 answer
157 views

Fetching data from ArcGIS attribute tables using ArcPy? [closed]

I want to fetch/extract data from ArcGIS attribute tables (to set some temporal series) using Python. Because of the structure of my tables and their disposition, I thought of using the "division" ...
Nour's user avatar
  • 25
2 votes
1 answer
129 views

Getting layer label from ArcMap Table Of Contents?

How do I get a layer´s label from the TOC? I can´t find a similar question and ArcGIS Help tells nothing about it. I have searched even in other knowledge bases but with no success. I need to get ...
jonlew's user avatar
  • 451
4 votes
1 answer
139 views

Getting and editing list of strings from file geodatabase

I have a file GDB that contains Annotation and Polygon feature classes. I would like to create a list of strings with the first part of the name of the polygon features. For example in the data below ...
mapface's user avatar
  • 431
-1 votes
1 answer
225 views

Mass Updating to Move Points to New Location using ArcPy? [duplicate]

I have updated x,y for about 50,000 points. How can I move the points to their new location at once (not one by one)? I know there is a way of creating a new .shp from updated x,y but that won't ...
user139471's user avatar
-1 votes
1 answer
197 views

Creating Python code with ArcMap to export maps in jpg?

I want to export maps that I have created on ArcMap 10.1 with this Python code: mxd = arcpy.mapping.MapDocument("CURRENT") for i in range(1, mxd.dataDrivenPages.pageCount + 1): mxd....
Isabelle_OBVMR's user avatar
1 vote
0 answers
204 views

Appending polygon features from file geodatabase table to SDE table?

I am facing an issue while appending the feature class to ArcSDE feature class. All the I am trying to append the gdb feature classs data, I can see that the geometry is either changed and some cases ...
royan's user avatar
  • 179
1 vote
1 answer
240 views

Comparison of GDB Table with a database table Comparison

I have to compare 2 tables one from gdb and another from database. I do not want myself to do a comparison one by one. Do anyone of you have a better idea for doing this? UPDATE: I have read the ...
royan's user avatar
  • 179
0 votes
1 answer
1k views

Verifying if user input as value exists in column using ArcPy?

I am trying to verify whether a value inserted by a customer exists in the field. import arcpy import os import sys #Set the work space arcpy.env.workspace = "Y:\Milad\GeometricNetworkAnalysis" path=...
Milad's user avatar
  • 28
2 votes
1 answer
223 views

Creating a "Data entry table" parameter - Arcpy tool scripts

I want to create an Arcpy tool script that takes values from a 2-column table placed in the tool itself, which is filled by the user, and stores these values in a real table. In order to do so, I have ...
Maik's user avatar
  • 461
0 votes
1 answer
376 views

Accessing composite data type parameter when validating parameters in Python Toolbox?

I have a simple tool with two parameters: a boolean (just to tick or untick it) a composite data (where I can choose an output location - either a folder or a feature dataset). I am unable to access ...
jonlew's user avatar
  • 451
1 vote
1 answer
1k views

Rotating point feature symbols by intersect polyline in ArcGIS Desktop?

I would like to rotate point features symbols by angle of polyline that they overlap. Similar to cartographic line symbol, that can rotate to follow line angle: I´m using basic license of ArcGIS 10.1....
Honzin's user avatar
  • 109
3 votes
1 answer
1k views

Tool validation - setting error message

I am writing a tool within Python Toolbox that has two parameters: param0 = arcpy.Parameter( name="a", displayName="A", datatype="GPFeatureLayer", ...
jonlew's user avatar
  • 451
1 vote
0 answers
149 views

ArcPy Editor commits in batches of a thousand records dropping some records

I am copying data from one database to another using arcpy cursors. This is an Oracle enterprise geodatabase against a versioned dataset. Using Python 2.7 and ArcGIS 10.1. The following code has ...
Richard Morgan's user avatar
4 votes
1 answer
2k views

Catching arcgisscripting.ExecuteError and error details?

I am with ArcGIS 10.1. In my Python script, I need to catch arcgisscripting.ExecuteError and other general Python errors. When a arcgisscripting.ExecuteError is thrown, I also need to retrieve error ...
alextc's user avatar
  • 2,023
3 votes
1 answer
2k views

Getting layer EPSG in ArcMap using ArcPy?

How do i get my layer EPSG with Python in ArcMap 10.1? It needs to return a integer. something like this: layerEPSG = arcpy.getActiveLayerEpsg() Here is some context: insrs = arcpy....
José Gabriel's user avatar
3 votes
3 answers
2k views

Creating perpendicular line from points to existing line?

I would like to create perpendicular lines from points to line, similar to this: I have ArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate ...
Honzin's user avatar
  • 109
1 vote
0 answers
125 views

Iterate a multistep Map Algebra

I am trying to write my first ArcPy script to iterate a Band Math process with requires a few steps. The uniterated, working script for a single group of bands in one Landsat scene is: #import ...
Abby's user avatar
  • 11
1 vote
0 answers
483 views

Object: Tool or environment <> not found error randomly occured in a custom Toolbox used in a Python script [closed]

I have developed a custom toolbox on ArcGIS 10.1. It has the following properties: Name: SingleFDI Label: SingleFDI Alias: FFDI In a Python script, I used arcpy.ImportToolbox to call a tool named ...
alextc's user avatar
  • 2,023
1 vote
1 answer
419 views

Arcpy Error 010423 when using Zonal Statistics to Table in a tool

I want to include Zonal Statistics to Table to my tool. But if I do I get the following error: Traceback (most recent call last): File "C:\Users\xyz\Desktop\test.py", line 16, in <module> ...
Gary's user avatar
  • 540
6 votes
1 answer
579 views

ArcPy script runs longer processing time in scheduled task than in ModelBuilder?

I have a Python script that runs ArcPy and a model that is imported with a Toolbox. When directly running the model on ArcMap, it takes 4 plus minutes. It takes about the same time if running in the ...
alextc's user avatar
  • 2,023
0 votes
2 answers
854 views

Automate publishing ArcMap mxd to ArcGIS Online using ArcGIS REST API or Python

I have a mxd file that contains several feature classes and they get updated every day. I am with ArcGIS 10.1 at the moment. It would be potentially upgraded to 10.5 in the near future anyway. I have ...
alextc's user avatar
  • 2,023
0 votes
1 answer
643 views

Coding python loop to select features of polygon layer than are completely contained in group of 11 layers using ArcPy? [duplicate]

This is my first attempt to code in Python. I have one polygon layer, A, that covers the UK and another set/group of layers that each cover sections of the UK, B. I want to select by location ...
Jennifer Taylor's user avatar
2 votes
2 answers
308 views

Checking if attribute field for labeling is present to avoid ArcMap Drawing Errors?

I have a project with several layers in the TOC that point to feature classes or shapefiles. Each of them is using labels and everything is ok. If I replace the source of these layers with some other ...
jonlew's user avatar
  • 451
0 votes
0 answers
28 views

pythonaddins interactive output registry to a shapefile recursively

I am using pythonaddin's onMouseDownMap to get flow paths interactively and add each line drawn to a shapefile. "line" shapefile is created each time using arcpy.RasterToPolyline_conversion whenever I ...
Ibe's user avatar
  • 1,231
0 votes
1 answer
48 views

Set Scale Button Doesn't Work

I'm trying to create a button that sets the map scale to 24000. I'm working in ArcMap 10.1 and my Python programming skill is rudimentary. I followed the Python Add-In instructions and the creation ...
MSinclair's user avatar
3 votes
2 answers
692 views

Relationship classes and feature classes with the same name

I've noticed that it is possible (at least in ArcGIS 10.1) having within a Personal geodatabase, a relationship class and a feature class/table with the same name!. This is my example: The above ...
Web-GIS entrepreneur's user avatar
0 votes
1 answer
107 views

polygon in polygon in polygon(or more...)

I have a buildings feature class which contains a building in a building (4 times), and I want to extract each building to a new feature class which created. I have written a Python code that does ...
avi's user avatar
  • 19
0 votes
1 answer
851 views

Determining spatial sort order with ArcPy? [closed]

How do I determine if a varying hypothetical set of lines (example in image) needs to be sorted by X (longitude) rather than Y (latitude) programmatically to ensure they are ordered from 1 to 14 as ...
pyRsq's user avatar
  • 146
2 votes
1 answer
781 views

arcpy.da.UpdateCursor with sql_clause for artifically inverting cursor loops

Why is row not recognized within my update cursor? The data is stored in a file geodatabase. I am using ArcGIS Desktop version 10.1 ArcInfo License. The screen shot shows the data "ORDER BY X ASC" ...
pyRsq's user avatar
  • 146
0 votes
1 answer
302 views

Why is ArcPy script looping through bands slow?

I am working on a single tiff with over 20k bands, each representing daily temperature, and I'll be extracting and preforming simple raster math on roughly 3500 of the bands. The problem I'm running ...
dil_lockd's user avatar
2 votes
1 answer
159 views

Modify certain serviceCapabilities parameters via ArcPy does not work

I would like to change some parameters in my sdDraft file using arcpy and XML parsing. Some of my steps work without any problems; other certain property-change does not any effect in the resulting ...
schlomm's user avatar
  • 720
3 votes
2 answers
540 views

arcpy.ListDatasets will not read CAD files as datasets

I am essentially running this script but for my own data. The problem I am having is that the ListDatasets command is not recognizing the CAD .dwg files as datasets (as it should). It returns a 'None'...
Simon.y's user avatar
  • 215
4 votes
3 answers
937 views

Renaming layer in a TOC using a tool within Python Toolbox

I created a simple tool that renames layers in the TOC using a for loop. As a tool within my normal toolbox it works fine. Now I´m trying to work more and more with the Python Toolbox and want to ...
jonlew's user avatar
  • 451
2 votes
1 answer
206 views

Creating sub-group under existing group for tools in Python Toolbox?

I have created a Python toolbox and a simple SimpleTool with this initialization: class SimpleTool(object): def __init__(self): self.label = "Simple label" self.description = "...
jonlew's user avatar
  • 451
5 votes
1 answer
7k views

Using SQL statement with ArcPy?

I've been using insert, update and select cursors found in arcpy.da and so far it's met my needs. Today, I found another situation where I really just want to throw a SQL statement at the database, ...
DenaliHardtail's user avatar
2 votes
1 answer
211 views

Getting 999999 error from ArcPy script to increment one field when another field contains 0?

Before I begin I should emphasise that my python knowledge is pretty limited; generally self taught or inspired by snippets I have found on here. I have a .dbf table, and I need to use python to ...
Smiff Lord's user avatar
2 votes
2 answers
445 views

Problem getting value from arcpy script tool with validation code driven drop-down: code window popup on tool execution

I am attempting to provide the user a drop down list of field values based on a predefined shapefile or table. The string value users choose then needs to be taken by the script tool for use later in ...
pyRsq's user avatar
  • 146
4 votes
1 answer
268 views

Avoiding arcpy.mapping.ExportToPDF locking mxd with data driven pages?

I've written a script that makes use of a data driven pages mxd, but I'm having issues with locks. The script iterates through a series of feature classes and uses them as the base layer for the DDP. ...
Emil Brundage's user avatar
5 votes
3 answers
4k views

Adding vertices to existing lines where they intersect using ArcPy?

I need to add vertices to existing lines at intersections, something like this: I want to do this automatically, by Python script. I can get the coordinates (x,y) of intersections in very simple way: ...
Lipstick's user avatar

1
2 3 4 5
16