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

learn more… | top users | synonyms (1)

1
vote
1answer
43 views

How to search for a specific field and then use it in Field Calculator

I have a piece of code where the goal is to search through the field names within a feature, select any field based on a specific character (in this case "z") and then use that selected field within a ...
2
votes
1answer
38 views

Changing highlight property of layer or table field using ArcPy?

I need to highlight a field of a layer. With ArcMap it is accessed from Fields property page of a layer. From there one can reorder, hide and highlight the fields. I couldn't find a property or ...
3
votes
2answers
97 views

Arcpy to get ArcGIS Application Data folder (My Toolboxes folder)

Is there a way (enviromental variable) in arcpy to get access to ArcGIS Desktop AppData Per User folder. For example I need to access this folder for arcgis 10.2: ...
1
vote
2answers
27 views

Problem using object as output path for arcpy.SaveToLayerFile_Management

I am simply trying to create a selection of a street layer from street names that appear within a separate .dbf of street names and create individual layers of each selection with a for loop. ...
3
votes
1answer
61 views

Stacking label boxes in ArcMap label expression

Is there a way to automate getting a seperate text box for two different field names in the label expression in Arcmap? Right now I have both fieldnames stacked in the same box. Without having to ...
2
votes
1answer
51 views

Changing Field Name/Apply Symbology from layer using ArcPy?

Using ArcMap 10.1, I want to use the Apply Symbology From Layer tool, however my field names are not the same. I'm having trouble understanding how to change the Field Names in a layer. I tried the ...
0
votes
1answer
42 views

Custom Script Tool Error - 000732

I am having a problem when impoting a script into a custom script tool. I am not the strogest person with python, but I have an existing scipt tool which was created by someone who does not work here ...
3
votes
0answers
43 views

arcpy, ExportToSVG using paths

I want to export part of the map into (very big) SVG file. First I tried to do this using REST API: https://*server*/ArcGIS/rest/services/General/Etages/MapServer/export. This worked, the SVG file ...
1
vote
0answers
20 views

surface area in a basin with reference to incremental height of DAM

I want to calculate "surface area in a basin with reference to incremental height of DAM" i tried this: step_size = 10 # metres; reduce this if you want finer resolution num_steps = 20 # increase ...
2
votes
1answer
35 views

script to draw a square where the raster pixels contained within are a certain type and greater than X

I have a raster containing different pixel values and I am interested in having squares drawn around areas that are at least X m^2 and containing at least Y type of pixels. The data looks like this, ...
1
vote
1answer
47 views

Auto-refreshing triggered by changes in directory for ArcPy?

I have a directory change monitor python script which monitors any changes happened in a directory, I want to trigger Arcmap auto refreshing whenever a change has been detected (eg. a new line added ...
1
vote
0answers
17 views

Bringing Alias properties with Feature Class to Feature Class Tool?

I am using arcpy.FeatureClassToFeatureClass_conversion(fc, outWorkspace, fc) to move many FC's to a new location. I have found that it is only bringing the FC Name property and imposing that on the ...
0
votes
1answer
18 views

Getting the majority value for a number of rasters in a conditional statement

I am trying to execute a conditional statement using Python and ArcGIS 10.1 that looks something like this: outRas = Con( MAJORITY (raster1, raster2, raster3, raster4) > 110, 1, 0) The idea is ...
1
vote
2answers
35 views

Inputting integer values into SQL statement using ArcPy?

I am defining a function for use in a ArcGIS tool that will verify attributes, catch errors, and obtain user input to rectify those error. I want the tool to select and zoom to the segment that is ...
2
votes
1answer
36 views

Calculating slope for points with downhill slopes rendered as negatives in ArcGIS

I have a DEM and a series of points. I'd like to measure the change in slope along the series of points. Distinguishing between uphill and downhill slopes matter to me, and ArcGIS' slope function ...
2
votes
1answer
41 views

Adding text background color using ArcPy?

Is possible to add text background color using python on ArcGIS (ArcMap 10)? I wrote a function that able to change font color of the string but I want to add background color to it as well def ...
2
votes
1answer
97 views

Why is Python AddIn toolbar showing all “Missing” tools/buttons?

I am horribly new to coding with python. I made a toolbar using the wizard and old bits of VBA code. I created a button to search by map number, a tool to calculate area from UI and a second tool ...
2
votes
2answers
166 views

Arcpy error: ERROR 000732: Clip Features: Dataset xxx does not exist or is not supported

I've been working on a project. A small part of it is to clip point features by ellipse polygons. I need to loop through a set of IDs, when I call "clip" function via arcpy, a very strange error ...
0
votes
1answer
46 views

Using sublime text for Arcgis or Arcpy?

I have installed python 27 in one directory c:\program files\python27 and arcgis 10.2 in another directory c:\program files\arcgis, and within this folder there is c:\program ...
1
vote
2answers
62 views

AddIndex_Management throws maximum open cursors exceeded

The following script is run to create indexes across all the feature classes within a particular dataset: import arcpy import os.path def listFcsInGDB(): for fds in ...
0
votes
1answer
44 views

How do I specify a spatial reference when using da.InsertCursor?

When using an InsertCursor, I can specify a spatial reference per http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000002z000000. I'm using da.InsertCursor because that's what everyone ...
2
votes
1answer
106 views

Why is arcpy.CalculateField_management() writing 1899-12-30 00:00:00 instead of expected date?

I'm using ArcGIS 10.3.1 for Desktop to test before writing an answer to How to enter date with arcpy.GetParameterAsText with arcpy? I have written the test code below that I am running against a test ...
0
votes
0answers
21 views

difficulty populating date field with arcpy [duplicate]

Here is my date variable in the class "rropthema": erfdat ="'31.12.2007'" Here is the arcpy code: arcpy.CalculateField_management(fc, item, rropthema.erfdat,"PYTHON") Here is the error: ...
1
vote
1answer
29 views

XML Document points to the wrong location after using arcpy.BatchProject()

I'm trying to reproject a number of shapefiles representing contours from NAD_83_Albers to NAD_83_UTM_Zone_9N using arcpy.BatchProject(), but I have to use python/regex to preserve a particular file ...
3
votes
3answers
109 views

Using boolean parameters in Python Script Tool of ArcPy?

I'm using ArcGIS for Desktop 10.3.0.4322 I have a script tool which requires a parameter (folder path to a gdB, via GetParameterAsText) so that a later process can be saved there. The thing I want to ...
-1
votes
1answer
39 views

Feature Attribute Count Script

Using an arcpy script how do I get the feature attribute count per feature class in a fileGDB? Ideally I would like to output to a spreadsheet, with the feature class name in one column and the ...
0
votes
0answers
30 views

How to change the default field names while processing dissolve?

I need Count, Max and Min values when running Dissolve in a model builder. In the resulting tables, the name for the count values are "Value_COUNT", but the names for the max and min values are the ...
0
votes
1answer
24 views

Select by attributes from a series of feature classes

I have 16 feature classes. What I want to do is to select by attributes each feature class using this statement: "Shape_Area" < 1100 Is there a way to do this by batch using arcpy or ...
0
votes
1answer
32 views

Arcpy Append doesn't work with tables

I am trying to get data from table A to table B. But it is important that domains in table B would remain. So I tried to use Append, but it doesn't work with tables. Any ideas?
3
votes
1answer
26 views

Problems with Reclassify and RemapRange in ArcPy?

I'm having a bit of trouble with a script that uses ArcPy. I keep getting the following error: ExecuteError: ERROR 000622: Failed to execute (Reclassify). Parameters are not valid. ERROR 000628: ...
1
vote
1answer
95 views

How to use script tool in python add-in wizard

I am trying to use a script tool in python add-in wizard to make a toolbar which will have button options. The script tool is working fine in the toolbox and I am using them in arcgis 10.2.2. The ...
1
vote
2answers
84 views

Use Python to Find duplicate values in a feature Class and populate a field

So I found this python script on another post here and was trying to adjust it for my needs. I'm a very novice python user so I'm struggling with how to modify the script. I have a Feature Class ...
1
vote
1answer
72 views

Python toolbox - keep parameter value updated after re-altering parameters

I am writing a Python toolbox with (among other) 3 parameters: 2 boolean (check boxes) and 1 string. The string parameter's properties depends on the 2 booleans' value: If at least the first boolean ...
0
votes
2answers
81 views

Comparing field values of two feature classes using ArcPy?

I have an intermediate fc #1 that contains data that I would like to append to my production fc # 2(final output). When working with the data, I would only like to append data from my fc # 1that is ...
-2
votes
1answer
55 views

Fail to publish GP as a service

I have no idea what the issue is here, I created this scripting tool which works fine when I run it through ArcGIS desktop. However, for some reason, I am unable to publish the tool as a service.The ...
0
votes
0answers
39 views

Validating derived parameters for ModelBuilder and Python Toolbox?

I'm working on a tool in a Python toolbox and I'm running into trouble getting the output tables to work in ModelBuilder. The tool takes an input table view and ultimately uses the Table Select ...
2
votes
1answer
69 views

QGIS Plugins & Tools that replicate Select ArcPy Tools

I developed a complex python application for road generation from GPS Devices that uses a few Arcpy Tools. I want to try and replicate this Applications functionality using a freeware like PyQGIS ...
0
votes
3answers
77 views

How to use Select Layer by Attribute in ArcPy

I want that one variable takes input from the user and then we compare the value to the attribute. val = input("Ask user for something.") arcpy.SelectLayerByAttribute_management("Sample", ...
0
votes
1answer
86 views

Draw polygon with GUI

I'm looking to make a python add in tool for ArcMap to draw a polygon. Eventually I want the tool to also calculate the area and a bunch of other things but for now I would be happy just drawing an ...
0
votes
0answers
40 views

Porting Arcpy script to linux cluster machine?

I wrote a series of arcpy scripts, and I am wondering how I can port the feature to Linux cluster machine? I found that ArcGIS server 10.2 runs on Linux machine, does that means I can theoretically ...
0
votes
3answers
65 views

Writing Python script to populate fields of layer with underlying info from another layer?

I have layers of points and lines that have to be updated regularly. It needs to have the intersecting attributes from another layer stored in its fields/attribute table. IE. towns, school districts ...
0
votes
1answer
59 views

Create a Loop for Arcpy

I am looking for help to write a loop a arcpy.CalculateField_maagement process where the User is asked with the 'raw_input', prior to the tool running "Do you need to change a field value(yes/no):", ...
-1
votes
1answer
70 views

How to extract information from world file of images into a DBF catalog file through PYTHON?

Here are thousands of pictures in JPG or TIF format with world file such as jgw and tfw. Inside each file, projection information for each pictures were contained. One example of the content for a ...
1
vote
0answers
39 views

How to correctly input complex multiband functions in Raster Calculator?

I'm trying to compute a MTVI2 (Modified Triangular Vegetation Index - Improved) and EVI (Enhanced Vegetation Index) from Landsat 8 imagery. My formulas are as follow (I'm using ModelBuilder): MTVI2= ...
1
vote
1answer
44 views

Update Cursor with Date Issue [closed]

My dates (maxDate, minDate, avgDate) all print out with the correct datetime format, but I am unsure if the problem is how the loop is written to update the cursor. Error: line 102, in updateRow ...
1
vote
1answer
29 views

Using WK ID's when using CreateSpatialReference tool

I recently found out how to create specific spatial reference objects and add them to my arcgis python standalone script. ...
3
votes
1answer
99 views

Match features that are spatially similar with ArcGIS?

I'm hoping there might be a way to match features from one feature class to features of another feature class that are the most spatially similar. I have two datasets representing the same thing but ...
1
vote
1answer
56 views

Graph/Network building and analysis of linked polygons in ArcGIS 10.2

This is more of a follow-up question to Divide polygons into *n* number of groups of equal counts with ArcGIS 10.2 and grouping village points based on distance and population size, particularly the ...
1
vote
1answer
41 views

How to select layer of .shp format by attribute using ArcPy?

I have to first load a vector layer (in .shp format) in arcmap and then it should select to specific attribute (the name of attribute is taken as input from user which i have done). and only selected ...
2
votes
1answer
29 views

Parameter to script tool gives Invalid expression ERROR 000358?

I have created python script tool in arcgis 10.1 as below. I am trying to take input parameter and passing to select statement. There is error when i execute this tool. import arcpy from arcpy ...