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

learn more… | top users | synonyms (1)

0
votes
0answers
22 views

updateParameter() python toolbox

I can't update parameters in my Python Toolbox and I don't understand why. Someone can help me with this example code? class Tool(object): def __init__(self): self.label = "Tool" ...
1
vote
1answer
48 views

How to delete duplicate rows where multiple values are duplicated?

I have a feature class where there are multiple values duplicated in a row, i.e. SRNumber and RESOLUTION_CODE. I would like to delete all rows where my SRNumber and RESOLUTION_CODE are found in ...
0
votes
0answers
7 views

Putting “halo style” to labels with ArcPy? [duplicate]

I'm using ArcGIS 10.3 and I'm making a script I need to turn the field label of "ROUTE" and put my halo style lebels and add a text to my lebels this is my script as could modify my script? layer = ...
0
votes
1answer
49 views

How to batch merge point, polygon and line feature classes into a new feature class?

Using ArcGIS 10.3 for desktop. For our noxious weed surveys, we have some features recorded as polygons, some as lines, and some as points. I would like to convert everything to points, and then ...
2
votes
0answers
40 views

Update feature class from values in csv file [closed]

I'm trying to update a feature class with new data from a csv file. My workflow is as follows: Make a csv reader from csv file Identify my data columns using their index position Use an update ...
0
votes
1answer
26 views

Arcpy - add layer tif

I'm trying to write a python script that will add a tif to the table of contents of my map. (Eventually I want to convert to tool that allows the user to type in the filename and then has the tool ...
2
votes
0answers
35 views

arcpy RasterToNumPyArray causes shift in location of values

I am converting a couple rasters to arrays, then performing calculations on them. First step- polygon to raster. This creates a 1/0 mask that I can multiply the larger raster by. After noticing my ...
6
votes
1answer
90 views

Bing Authorization interrupts arcpy script

I made this happy little arcpy script to fix some data source problems: print "Hi, I will fix find and replace file path sections on your behalf. \nGive me a moment to just count the number of MXDs ...
0
votes
2answers
56 views

UpdateCursor not calculating the date

My UpdateCursor isn't working in arcpy. Here's my code: urows = arcpy.UpdateCursor(firstDatabase+ os.sep + "Temp") for urow in urows: urow.Import_Date = time.strftime("%d/%m/%Y") ...
0
votes
2answers
26 views

Selecting files with matching names and then executing a process

I have two lists and I would like to find a way to select them based on names. In list one I have a series of tif files: list1=['LT50300281984137PAC00_sr_band1.tif', ...
0
votes
0answers
12 views

Using the 'Mean' mergeRule with a spatial join

I have two feature classes. The first is a point file, derived from a raster, with the values for slope of the terrain. The second is a shapefile of polygons. What I want to do is spatially join the ...
1
vote
1answer
57 views

Determining local geodatabase release version with arcpy?

Can anyone get the release version of a ESRI local geodatabase, using arcpy? I should be simple, and yet... I use the "Describe" function on both personal and file geodatabases, and need to retrieve ...
3
votes
2answers
209 views

Using PyQGIS, ArcPy, NumPy, SciPy Together in Windows Command Prompt

I ran across this slight issue when I was looking to access python installations from ArcGIS, QGIS, Anaconda (cited because SciPy & NumPy come with it), and version 2.7 vs 3. Sometimes, I find it ...
0
votes
1answer
14 views

Creating polygons or map book from DBF file through ArcPy?

I have a dbf file, which contained a list of coordinate information as shown in below. It also could be thought as a catalog file. Example: ID XMIN YMIN XMAX YMAX 1 -52800.0 ...
0
votes
1answer
23 views

Using Raster Calculator expression in Python

I've posted about this problem before but I've got a few new questions. So here's the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll ...
0
votes
1answer
40 views

Unknown Error? - A Column was specified that does not exist

shps = [(shp1,"field1"), (shp2,"field2")] for item in shps: shp = item[0] field = item[1] for row in arcpy.SearchCursor(shp, fields='"{0}"'.format(field)): if row == ...
0
votes
1answer
41 views

arcpy.da.UpdateCursor error: RuntimeError: create cursor has failed [closed]

I'm trying to delete a few rows in the output table that is created using the Compare Table tool (anything that has an ObjectID < 0). My script was working fine (i.e. it produced the table compare ...
0
votes
0answers
13 views

“df.zoom To Selected Features ()” is not near enough

Excuse me for my bad english I'm using ArcGIS 10.3 I am creating a script to screeshots I'm using df.zoomToSelectedFeatures () arcpy.SelectLayerByAttribute_management ("Road", ...
0
votes
1answer
35 views

How add a text field and then reproject all shapefiles which are in sub folders

I have a folder and inside of that folder, I have about 500 sub folders which contain on average about 5 shapefiles each. What I want to do is: to check if there is a field, lets say field_1, and ...
1
vote
2answers
46 views

ERROR 000824: The tool is not licensed from arcpy.gp.ExtractByMask_sa()? [duplicate]

I know I have spatial analyst licensed and the tool works fine within ArcMap but when I try to run this code snippet: import arcpy arcpy.CheckExtension('Spatial') # which returns 'Available' ...
0
votes
1answer
30 views

ArcGIS desktop won't import arcpy

I have arcgis 10.3 and I am trying to run a task using python but the python window within arcmap won't import arcpy. This never happened to me with 10.2.2. The error returned is: Runtime error ...
0
votes
2answers
27 views

Arcpy array TypeError: Abstract Class

I am using arc 10.2. Every time I add an array both python 2.7 and as a tool in Arc I am getting a "TypeError: Abstract Class". I have also tried changing my script multiple times to make the array ...
0
votes
0answers
15 views

Raster math with iterator (arcpy)

I know what I am trying to do here is wrong. But I was hoping for something similar that would do the job. Basically, I need a placeholder for values and raster calculations until I sum them ...
0
votes
1answer
46 views

Arcmap Python add-in wizard run code on start-up/open document

I have the following code that I want to run each time a Arcmap is open: Windows 7 ArcMap 10.3.1 I have followed the instructions here: ...
0
votes
2answers
39 views

Creating a value-counting table with search- and update cursor

I'm a python beginner. I`m working with ArcGIS 10.2.2 and IDLE Python 2.7.5 I have a shapefile with around 20 fields, each attribute has a value between -3 and 3. This would look like this: I ...
2
votes
1answer
28 views

Searching for value in layer without opening MXD file?

As part of the validation for parameters of a Python toolbox, I need to check if the text in parameter #1 is exists in a layer in a MXD file selected as parameter #2. Currently, I use this code in ...
-5
votes
1answer
50 views

Can somebody help with me with my if statement code on the bottom [closed]

try: # Import the modules import arcpy from arcpy import env # Set up the environment env.workspace = r"C:\Users\Neng\Desktop\Fire_Files_For Oct_2010.gdb" env.overwriteOutput ...
0
votes
0answers
29 views

how do I create a feature class from a table?

I have a database table that has the column and types defined. But it's a database table. I need a feature class so I can add spatial functionality, like add a SHAPE field. How do I create a feature ...
1
vote
1answer
24 views

ExecuteError: ERROR 000358 - Using a variable within arcpy.Select_analysis() [duplicate]

I have looked at the solution here and while it is very similar to the question I'm asking I ran into the same issue after implementing its syntax. I feel like I'm still missing something related to ...
0
votes
2answers
60 views

Request for feedback on python script to increase efficiency with cursors

I’m new to python and would love some suggestions on improving the efficiency of my script. Background: My script is intended to create a report of the dominant and limiting soil types for ...
0
votes
0answers
22 views

Select Data in ModelBuilder Error 000622 and 000800

How to build a model takii way to avoid this error? I need to layer the missing tool is created automatically or miss it and extending those layers in MXD are available in gdb ... More specifically, I ...
1
vote
1answer
44 views

Why are tool outputs disappearing from the mxd at the end of a python script tool?

The script below works fine and produces the correct output, but after my output is being added to ArcMap, which is what I want it to do, it then disappears as the script is finishing up. I'd like for ...
1
vote
1answer
22 views

How can I set X/Y shadow offset values to 1 and -1 in the advanced text window?

I'm trying to use a label expression with ArcGIS formatting tags to create a shadow on my text. I've done everything I need except assigning a value of 1 to X offset and a value of -1 to Y offset. ...
0
votes
0answers
20 views

layer name and longName are identical when they shouldn't be

I am attempting to use a script to re-source a bunch of layer files in a folder (adapted from Unable to change data source path for group layer file): import arcpy, datetime, os, io, sys def ...
1
vote
0answers
20 views

PyScripter auto-complete pop-up help?

How do I get the pop-up help window that's part of the auto-complete to show more definitions of the tool being used? For example in the attached image the definitions of "Buffer_analysis" inputs ...
0
votes
2answers
34 views

Expressing a Raster Calculator expression with Math Toolset

So here's the problem. I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll call this raster1, and another containing the difference between two ...
0
votes
0answers
17 views

Create TIN failing to execute using Python script (ArcGIS) [duplicate]

out_tin = output_folder + os.sep + file out_tin = out_tin.replace(file,river_mile) arcpy.CreateTin_3d(out_tin,sr,"pointfc_filenames Shape.Z masspoints <None>","DELAUNAY") ...
0
votes
2answers
47 views

Print Feature Class Location with ArcPy

I would like to know the path of a feature class that is in my TOC in ArcMap, how can this be done with ArcPy?
0
votes
1answer
37 views

Sort and subset feature classes using Python script

Here's my situation: I've got multiple utility feature classes, and each fc is subtyped according to one the primary attributes, which is a String. Each fc has at least 12 attribute fields, and each ...
2
votes
1answer
35 views

SDE State ID with Python

I have created a Python script which compresses an ArcSDE geodatabase and now I would like to view the State ID after the compress. Is there a way with Python I can get this info?
0
votes
1answer
27 views

Closest Facility

wonder if anyone can help me. I make a network analyst (Closest Facility) analysis. I will be driving from "Incidents" to "Facilities". My "Facilities" is the population center in a municipality. In ...
0
votes
1answer
29 views

Problem with arcpy.ValidateFieldName and unicode characters?

I am having problems with the arcpy.ValidateFieldName function in combination with unicode characters. I want to add a field to a shape field. The field name is not allowed to be bigger than 10 bytes ...
1
vote
1answer
57 views

Arcpy.Delete_management() not deleting folder?

I've written a script in Python that takes in two ascii files that represent surfaces, then convert them to Rasters, and finally Negate their values (i.e. multiply all cells by -1). In the script, I ...
1
vote
1answer
48 views

Python for select by attribute then remove from current selection

I have a table called"July_join". Within this table I have many attributes or columns. I want first to select every thing under "grade" column that has values of 90, then remove from this selection ...
0
votes
0answers
44 views

How to add rule and add feature class to topology using arcpy and stop getting error 000732?

This script successfully added feature classes to topology when that is all I had scripted it to do. Now I've added the add rule parts (#added) and it's still just adding feature classes without ...
0
votes
1answer
41 views

Error Executing tool: ArcPY

I am stuck with a code due to a RunTimeError: Object: Error in Executing tool and I really can't find the mistake. The code is # Now, the script for "Adding Surface Info" to the network, using the ...
0
votes
0answers
24 views

remove layer from mxd document using arcpy

I would like to remove some layers from the MXD document currently used by a service in the ArcGis Server. I am using arcpy to achieve this task. Here is my code for removing layers from MXD ...
4
votes
1answer
107 views

Python toolbox tool objects do not remember instance variables between function calls?

I am developing a Python toolbox, and came across a peculiar behavior: The tool objects does not remember any instance variables between function calls. Consider this code: import arcpy class ...
0
votes
0answers
21 views

Multi Input Python Toolbox in Arcgis

I use Python toolbox in arcgis, it is possible to add a multiple input file table? And is possible to filter input files allowed by extension?
-1
votes
1answer
23 views

ASC file to GeoTIFF

I would like to convert using Arcpy an ASC file to GeoTiff but I can't find nothing about it. I tried : arcpy.ProjectRaster_management() changing .tiff to .geotiff but it didn't work.