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

learn more… | top users | synonyms (1)

4
votes
1answer
71 views

Can ArcPy fill forms in Add-in interface?

I'm trying to build an ArcPy tool, which will ask the user to input some information (ID, Name, Address, Zip, etc.) first. My add-in interface is shown below, and hope to implement that once the user ...
1
vote
2answers
46 views

Set parameter of field from number to string with python

since I realised python is a very useful tool in ArcMap I dont want to do any workarounds anymore. I have a field with is numeric, but I want to perform this calculation in the field calculator on it ...
1
vote
2answers
80 views

How to copy selected features from one sde feature class to another with different attributes using Arcpy?

I am new to Arcpy scripting, I need help on copying the features to SDE feature class. My Scenario: We have 2 Geo databases running on Oracle 11g ArcSDE 10.2 . I have been asked to write the python ...
5
votes
1answer
167 views

Is there a way to use ArcPy module in the python shell that is not with ArcGIS?

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits ...
1
vote
3answers
82 views

Merging many to one data rows in arcpy [duplicate]

The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with. The NODE values indicate a single point feature, but is duplicated with many ...
0
votes
3answers
60 views

Script tool problems

I'm having trouble making a script tool in ArcGIS. I have developed a script that will edit certain values in the attribute table. Without incorporating a script tool this script works fine and edits ...
0
votes
2answers
36 views

Select and export by attribute iteration

I'm trying to do a loop for select and export layers by attribute and name them based on the field value. I've written the script below and it creates the shapefiles which picks up field values as ...
0
votes
1answer
80 views

How to programatically modify the placement properties for labels

Does anyone know how to modify the location of a label programatically? I'd like to make the labels sit directly below the symbol!
1
vote
1answer
85 views

Creating a Simple Join Script in Python

I'm trying to create a simple join script in python from an arcgis model, where the only steps are joining a map to a table to produce a map with the table's properties. The attributes joined ...
0
votes
1answer
34 views

excluding NaN records from FOR loop?

I am trying to create an array of Z and M values for vertices from a polyline (Z and M enabled) feature class. Some of the vertices do no have M values/geometry and I wish to exclude them from the ...
1
vote
1answer
84 views

Using UpdateCursor to update a field based on other field values

I've been trying to create a python script that will update certain fields in the arcgis attribute table. I have attempted to do this by using the update cursor to update a field based on another ...
1
vote
1answer
74 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 ...
1
vote
1answer
30 views

How to use arcpy to ungroup a group layer in an mxd

I am looking for a way to ungroup a group layer using arcpy... (instead of having to open the mxd and right-click on the layer to choose "Ungroup"...) mxd = arcpy.mapping.MapDocument(pathToMyMxd) df ...
0
votes
1answer
42 views

Add points to shapefile and display over map interactively using Python Add-Ins

I want to add points to a shapefile interactively using pythonaddins and display them over map. Points are added to shapefile but not to display. Please suggest how to fix this discrepancy. class ...
0
votes
0answers
25 views

Using arcpy to enable layer masking (Advanced Drawing Options)

I am looking for a way to enable and change layer masking (under Advanced Drawing Options) with arcpy... it seems you can do this if you have the Production Mapping extension, but I do not have it... ...
0
votes
1answer
68 views

arcpy Make Feature Layer using a where clause

From a table of lines and polylines I am I'm building a seperate table of points (nodes) with their X and Y coordinates stored as attributes. I want the nodes to be unique, so I'm checking to see if a ...
0
votes
1answer
46 views

Change symbology of all layers in table of contents

I am attempting to put together a DEM of the U.S. I have thousands of contour elevation files that I have loaded into an ArcMap document. I need to change the symbology for all of the layers in order ...
0
votes
1answer
72 views

using Z and M feature geometry to create line graph in Python?

I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with: # Import system modules import arcpy, os, sys, string from arcpy import env ...
1
vote
2answers
52 views

Nodata issues in map algebra

A dummy question. I need to change all values in my rasters into ones. I've been able to do this fine in the Rater Calculator just by multiplying the layer by zero and adding one (my_layer*0+1), but ...
1
vote
0answers
44 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 ...
2
votes
1answer
45 views

Flagging when point feature(s) covered by tables (made as graphics) using ArcPy?

I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common! I've made some tables (as graphics) using ArcPy and the technique ...
0
votes
1answer
43 views

Selecting raster data by location: for raster and feature class data

I have rasters covering certain spots in my environment, I'm looking for a way to extract the values which occur at locations which are defined by a selection of feature layers. I've tried with the ...
0
votes
1answer
48 views

Updating records based on value in another field using arcpy.da.UpdateCursor?

I am trying to write file names and paths to two separate fields in a feature class, and the value for each record is dependent on finding a match in a list. When I run my code it writes the same ...
3
votes
2answers
70 views

Efficient way to use a CSV to Define a Feature Class

I was provided an Excel Spreadsheet which had the definitions of fields for a feature class. There were several worksheets in the file, each containing field definitions for different feature ...
1
vote
0answers
63 views

Writing values to feature class in Python script results in strange characters"? [closed]

The script below does a series of things, and towards the end it is supposed to write values pulled from a list to a new field, if the feature class name is found anywhere in a list element. It does ...
2
votes
1answer
100 views

Merge from arcpy.ListTables() producing duplicate rows?

I was trying to manually merge file geodatabase tables and was getting Null values for the output file rows and decided to write a python script to merge the files. Here's my script: import arcpy ...
0
votes
0answers
27 views

How can I define coordinate system of feature class when overlaying with coordinate zone shapes in python?

I have generated bounding boxes for CAD drawings that do not have defined coordinate system files. I know that each drawing could be in one of 6 different systems that do not overlap. My idea was to ...
3
votes
1answer
80 views

Which feature class(es) is/are used by a service

I have several feature classes and a lot of services. When I try to make my feature class versioned I get the message that the feature class is locked which is obvious. But it's not telling me by ...
0
votes
1answer
47 views

Using os.walk to update broken links and save mxd

I've got code to walk through an entire directory and sub-directories repair broken links in each mxd and save the mxd. It works for the mxd's in the top directory but fails when trying to enter any ...
2
votes
0answers
39 views

how to make a list of features constructing the dissolved feature?

I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that. arcpy.Dissolve_management(self.address_cor_layer2, ...
0
votes
2answers
46 views

Make lists of shapefiles using loop

There are the following shapefiles in workspace. L01-1983_01.shp L01-1983_02.shp ... L01-1983_46.shp L01-1983_47.shp L01-1984_01.shp L01-1984_02.shp ... L01-1984_46.shp L01-1984_47.shp ... ...
0
votes
1answer
45 views

Splitting the job on Arcpy SearchCursor

I'm running a for loop with a cursor to disaggregate a large feature class into many smaller ones (of one polygon each). ArcMap crashes after about 1100 iterations, and I am trying to break the job ...
2
votes
1answer
49 views

Merge Shapefiles using a loop

I'm a new user of ArcMap. And I'm not good at programming language. There are the following shapefiles in workspace. L01-1983_01.shp L01-1983_02.shp ... L01-1983_46.shp L01-1983_47.shp ...
0
votes
1answer
28 views

Select Layer by Attribute: selection using loops

I'm quite new with python and i'm currently stuck trying to make a loop... I have a shape file of a grid with several fields of different species (more than 150). The values of each record are 0 or 1 ...
1
vote
2answers
35 views

finding the index of a field with its name using arcpy

I wan to extract the index of a field with its name using arcpy. it seems what I have written is so dumb. is there any simpler method with out using for-loop. import arcpy fieldList = ...
1
vote
1answer
35 views

Multivalue parameter as text in Python toolbox - reading in to imported module function

I'm building a Python toolbox with a tool which calls specific functions from a custom module. The main input parameter for this tool is a multivalue list of raster layers. In the execute block of ...
1
vote
1answer
28 views

python script in toolbox add a button on the window

I am getting stuck when I want to create a new python script in toolbox. The function I want to develop is to let user to input the user ID, then retrieve from the database the other values to allow ...
1
vote
2answers
47 views

Min/Max values from a feature class

I am very rusty/inexperienced in python and I was hoping someone might be able to give me some pointers on this script. I would like to create a more compact script that prints min and max values of ...
2
votes
2answers
114 views

Convert a Toolbox (.TBX) to a Python script (.PY)?

I have a .tbx tool box, which runs a script that is incredibly slow. So what I want to do is to open the python script that is running below the .tbx and make some changes or perhaps write something ...
-1
votes
1answer
54 views

converting a python list to arcmap table [closed]

I have values stored in a list that need processing in the costDistance tool in ArcMap 10.2 (desktop). For this they need to be converted into a table or file readable by arcmap's tools. Anyone with ...
1
vote
1answer
36 views

How to extract time information from a route analysis

I have a script in Python that solves a really simple route analysis problem (optimal way for given stops). I've found in the documentation that one can assign a start date for the analysis and get ...
0
votes
1answer
31 views

Identifying inserts, updates, deletes, and conflicts between a parent and child version in ArcSDE with ArcPy

I'm looking for a way to identify records that have changed between the present and the last time a version was reconciled. It would also be great to be able to identify conflicting records. Ideally ...
0
votes
1answer
32 views

I'm Having trouble with the Arcpy geometry.disjoint function

I have points along along a line. Points that intersect the segment of the line to return attribute information. My line as three connected segments. ESRI Docs says disjoint (second_geometry) ...
0
votes
1answer
46 views

Loading graph (.grf fle) into MXD using ArcPy?

I have hundreds of pairs of FGDB and associated MXD files. I need to insert a graph in each mxd linked to its corresponding FGDB. No problem creating graph, but stuck on how to get graph into mxd ...
0
votes
1answer
51 views

Obtaining the coordinates of point through arcpy

I have a feature selected from a feature class based on user input through arcpy. How can I obtain the x,y coordinate of the selected point feature class (Points). How do I do this?: ...
3
votes
2answers
78 views

ArcPy Append Ignores Domains

I've been working with the append tool inside arcpy and discovered that, even though I have domains constraining the values of some of my columns, I never receive an error when the domains are ...
0
votes
1answer
22 views

arcpy pantoselected error

I am trying to get an user input for getting a parcel name and pan the map to that selection. What am I doing wrong in the code below? import arcpy #Msg box to get parcel Name parcel_Name = ...
3
votes
1answer
97 views

Project point to map with Arcpy using GPS Coordinates

I am trying to create a new layer with just a single point using arcpy. All that is provided is a gps lat and long. It seems like it should be a simple problem but I just can't get it to work. I've ...
0
votes
0answers
49 views

Script to turn layers on/off in Data Driven Pages?

I'm working with Data Driven Pages to create a map series of communities (points). I'm using Model Builder to create a line poly feature for each community. The line poly shows the time away from each ...
1
vote
0answers
64 views

Convert Arcpy results to feature class in ArcMap 10.1

I am using ArcGIS 10.1 and am a newbie in Python. Currently we are executing stored procedure (from sql server) through ArcPy in ArcMap. I want to create feature class from executing following python ...