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

learn more… | top users | synonyms (1)

1
vote
1answer
27 views

Automation of changing symbology for a given layer

I have a shape file that is a 10-by-10 grid of squares. The shape file has 50 attribute columns (named p_1 through p_50) where each column has 100 entries (corresponding to the 100 grid squares) and ...
2
votes
1answer
113 views

Is there a way to set the workspace on selected features

i´ve built in a tool for arccatalog which transfers GIS Files into shape Files. Everything is working so far, but i want it a bit more customer friendly. Atm it looks like this: You can right click ...
0
votes
0answers
25 views

Apart from “in-memory” space and physical geodatabase, is there any other method to process raster data?

Using the centroid of the building footprints (tagged residential), I wants a count of hydrants within 135m, and a count of hydrants within 270m of every residential footprint. This would be based on ...
0
votes
1answer
14 views

How to get layers created in a custom toolbox python script to add to the mxd

I'm trying to create a simple search tool so that my colleagues can easily query a database. My first version is like this. mxd = arcpy.mapping.MapDocument("CURRENT") df = ...
2
votes
1answer
29 views

Arcpy if statement to act on layers at the top level of hierarchy

I am about to save copies of all of the layers in my mxd. I only want to save the top level group layers though. I have some group layers within group layers - I dont want to save them individually. ...
1
vote
0answers
7 views

How to to get time slice in raster dataset using ArcGIS?

I have a couple of rasters made in different time. Some of the rasters are overlapping and some of them - not. I need fast and efficient way to get time sliced values for each pixel. For example: ...
4
votes
2answers
947 views

arcpy.SearchCursor row.var

In arcpy.SearchCursor for row in rows I can return row.fieldname statically, but if fieldname is a variable, I don't know how to return the row.value of that variable dynamically. for example: ...
4
votes
2answers
124 views

How to run a python script on the server, returning the results to the client

Here's the end result I'm trying for: the user clicks on a feature on an ArcGIS Server JS map a Python script is triggered on the server the Python script uses an attribute from the feature (eg its ...
0
votes
2answers
22 views

batch save as layer to relative path in ArcPy

I would like to use a similar code as below, but one that uses relative paths. Since my input is a batch of tif files (not layers), I do not know if I need to use other functions like ...
7
votes
2answers
1k views

How to keep spatial reference using arcpy.RasterToNumPyArray?

I am using ArcGIS 10.1, and want to create a new raster based on two preexisting rasters. The RasterToNumPyArray has a good example which I want to adapt. import arcpy import numpy myArray = ...
-2
votes
0answers
31 views

How to set NULL value by arcpy.da.InsertCursor on date column?

How to set NULL value by arcpy.da.InsertCursor on date column? I try insert "NULL", None, '', 0 dictIN= [{'field1':"test1",'date1':'01-02-2015','date1':''},\ ...
3
votes
1answer
394 views

mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the arcpy.MosaicToNewRaster_management() tool with output to a file geodatabase. I'm principally working ...
1
vote
2answers
31 views

Inline variable substitution in Model Builder using python code

I have an inline variable substiution which I would like to import into my Python script. Is that possible? I am trying to make a parameter within my path. My path currently is ...
5
votes
2answers
740 views

Problem with the where clause in ArcGIS when dealing with variables

I am writing a python script for ArcGIS. I have an input feature class which contains multiple pipelines which is saved as a variable InputPipeline. I would like to iterate through the pipelines and ...
3
votes
1answer
52 views

More efficient way to get the start and the end points of a line (arcpy)?

I am collecting start and end points for a large polyline feature class in a file geodatabase. I am using arcpy, ArcGIS 10.3, Python 2.7.3 64-bit and a 10.3 compressed file geodatabase with just one ...
2
votes
1answer
185 views

Creating relationship class with ArcPy using GlobalID?

I'm trying to create a relationship class with Python using a GlobalID. When I use Python it gives me the error: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a ...
1
vote
2answers
34 views

SplineWithBarrier (Spatial Analyst) - different results between model builder and external python script

I'm puzzled by different results I get from application of SplineWithBarrier (Spatial Analyst) using Modelbuilder and by external Python scripting: import arcpy points_shp = "pointShape.shp" ...
2
votes
1answer
1k views

How to create multipart line and polygon with interior ring in arcgisscripting?

My objective is to swap X,Y coordinates of feature classes using Python and arcgisscripting. Based on help examples, I managed to write script which reads and writes all geometry types. The problem ...
1
vote
2answers
96 views

Adding/updating field to polygon feature class that lists bordering (neighbor) polygons?

I have a dataset of zipcodes. I want to add a new field "NEIGHBORS" that includes bordering polygons in a comma delimited manner such as attached image:
5
votes
2answers
105 views
+50

ArcPad Checkout from python command line

I have been developing a script to automate my ArcPad checkin/checkout processes. My problem is that I am having trouble getting arcpy to recognize the ArcPad tools from the command line. From the ...
2
votes
1answer
269 views

Converting standalone script to ArcGIS tool?

I am currently trying to make my (working) standalone script into an ArcGIS tool so I'm not the only person in my office that can use it. It selects all the data within a specified location and ...
2
votes
2answers
50 views

How to get cell value along Flow Direction

I have: a flow direction raster where I took off (assigned NoData value) the cells that overlayed the river network (from flow accumulation). a perfectly overlapping raster where I asigned a ...
4
votes
2answers
5k views

Change Symbology of layers from within ArcMap

In an active ArcMap session - I want to change the symbology of a layer which is repeated multiple times in the mxd. Can I do this? The basic code I have for getting the layers is below. This is ...
1
vote
1answer
20 views

Using Python Script to change Pie Chart Symbology

I am trying to change the symbology for Pie chart in ArcGIS. I have a feature class which is joined to a table and I will like to symbolized as a pie chart. I will be symbolizing it a lot thus I am ...
3
votes
1answer
174 views

No placement inside feature dataset using arcpy XYtoLine?

When I run the following code with the outFC creation path set to a feature dataset inside a file geodatabase... arcpy.XYToLine_management(tempFC, outFC, "POINT_X", "POINT_Y", "NEAR_X", "NEAR_Y", ...
0
votes
1answer
27 views

Calling An ArcGIS Webmap's Scales

I am composing an Arcpy tool to help users cache their current mxd's webmaps (our own services). I want to know a way to call the ArcGIS Web Map's scales with ArcPy. Once I have the web maps scales, I ...
5
votes
3answers
111 views
+50

Issues Adding MapServerCache Raster Layers to Mxd

I have created a data consolidation tool. It consolidates a users mxd's vector and raster data into a project structure. It also allows the user to optionally cache our companies ArcGIS Server Web ...
2
votes
2answers
641 views

Python scripting for ArcPad Checkin

I can use ArcGIS Desktop model builder to leverage the ArcPad Check In Tool. When I run the model it executes successfully. When I export the model as python I get this code: import arcpy # Local ...
7
votes
3answers
1k views

python script error- with GetParameterAsText

I have a seemingly simple code which iterates through a list of feature classes and calculates an ID field in the attribute table that is equal to the first 5 characters of feature class name. The ...
2
votes
1answer
165 views

Optimizing arcpy script to batch generate OD cost matrix in road networks

Following the question I asked in this thread, I wrote a python script designed to compute an OD cost matrix given a road network and origins/destinations locations. I am completely new to python, so ...
0
votes
1answer
36 views

Pythonic way to recalculate feature extent in ArcGIS 10.2

I am creating a tool that will automate a tedious process of data standardization. One of the steps is to recalculate the feature extent of a SDE file. Surprisingly I cannot find anything useful in ...
1
vote
1answer
38 views

ArcGIS geometry update from table XY

I am trying to update the geometry of a point FC stored in a FileGeodatabase using ArcPy. I got this Python script to compare the values of the SHAPE@X and SHAPE@Y and change the Geometry if not ...
5
votes
2answers
403 views

Split one field into 3 fields?

I need to split the values in a field according to what they represent to be able to do a join on the data. As seen above I have a ID field that needs to be split into the following: The ID consist ...
1
vote
0answers
33 views

Arcpy.Exists Fails On Existing Layers

I am running into an issue where the arcpy.Exists() function returns a false for a known good layer in the python interactive window. We are using a map document template for the layers set up in the ...
0
votes
2answers
55 views

Set arcpy command line parameter same as Tool parameter

I have a python script that works correctly when used in a toolbox but not from the command line. How do I duplicate the toolbox magic that happens when specifying a parameter Data Type? There is ...
1
vote
1answer
24 views

How do I insert a date string into the database as a date?

I'm using an InsertCursor to insert rows into a feature class. One of the fields in the source data may contain a NULL data value. The destination feature class requires a date - it is not nullable. ...
-1
votes
2answers
134 views

arcpy calculate string field: Any ideas what how to fix this?

I'm trying to store a string value obtained from a loop through a tuple into a field called ROW_1. The code goes like this: for creekclass in listOfClassTuples: (classname, Permanency, ...
2
votes
1answer
122 views

Remove all default values on multiple feature classes

I would like to remove default values from all fields used by all feature classes in an SDE geodatabase. I do not see a geoprocess for removing the default value, only setting it. So I am trying to ...
0
votes
1answer
21 views

Accessing “valueField” property of layer's symbology using ArcPy?

This has been really hard to debug, as I had no idea where to look at first, but I have made an attempt to access the "valueField" property of a layer file. This layer file is of the UNIQUE_VALUES ...
2
votes
2answers
65 views

Using lists in Python functions [closed]

I have some code in a function that uses a list, which works, but is there a way to write a list outside of the function and use it within the function code? For example in my code below I have a ...
0
votes
1answer
16 views

How to troubleshoot “RuntimeError: The field is not nullable [Column_Name]”?

I have a python (arcpy) script that extracts data from a database table, processes it, and inserts into a feature class. It works in my development environment but not in production. I recently ...
2
votes
1answer
134 views

AttributeError with unicode object with data frame in python script

I'm running a python script from arccatalog and it works, however, I am trying to add layers to an mxd and need to declare the data frame. I keep getting this error message. type ...
0
votes
1answer
217 views

Spatial ETL Tools won't run “AttributeError: 'module' object has no attribute, etc.”

I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task. Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line. If I ...
2
votes
1answer
30 views

ArcGIS Python Toolbox Parameter Filter.List ValueList Delete/Remove for Reconciling Versions

Does anyone know if and how you can remove a value from a parameter filter list? In my case, I am using a python toolbox in ArcGIS 10.2.2 and want a drop down list of all the versions for the person ...
2
votes
0answers
18 views

Is it possible to add an ArcGIS attachment to a row in Oracle/SDE using oracle stored procedures?

So far I have been able to attach files to features within a featureclass using the python tools and ArcObjects. Within Oracle I have been able to add features with geometries using the ST_Geometry ...
5
votes
1answer
189 views

How can I exclude a field on a table from being copied?

I have a query "layer": >>> r = arcpy.MakeQueryLayer_management(r'C:\path\to\connection\file\connection.sde', 'TEST', 'SELECT T.ID AS OBJECTID, T.* FROM MY_TABLE T WHERE T.SOME_COLUMN = 1', ...
1
vote
2answers
148 views

Why is my cursor empty?

Yesterday I set up a Python script using a cursor on a layer. Today I've tried running again and no matter what I run it in, the cursor is empty. I've tried removing the query on the layer, tried ...
1
vote
1answer
38 views

How to print a list of Tools from their respective Toolboxes with arcpy?

I would like to print a list of Toolboxes as listed in my Python code, however I would also like to print the tools in that Toolbox under neath the Toolbox name like so; Analysis Tools(analysis) ...
2
votes
2answers
407 views

CopyRows_Management in ArcPy gives ERROR 000732?

I get the following error when running a CopyRows_Management with Python (ArcGIS 10.1): ERROR 000732: Input Rows: Dataset \MyConnection.odc\MyTable does not exist or is not supported Here is the ...
1
vote
1answer
2k views

Looping through multiple feature datasets and Intersect Files?

I am getting an error with a python script I have created. I have 1 geodatabase with 3 feature datasets. What I would like to do, is loop through 1 feature dataset (NB) to get a list of feature ...