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

learn more… | top users | synonyms (1)

1
vote
0answers
212 views

Clipping .mdb in place and schema locks

I have an .mdb with a feature class that I want to clip in place - that is, I want to clip it with another polygon, and then store the results back in the original .mdb. I am doing this with arcpy. My ...
1
vote
0answers
284 views

ArcGIS/arcpy: Geometry object comparison methods not working. Do they take z values into account?

I have an arcpy script that makes calculations based on an input PolygonZ feature class. What I need to do in several places in the script is test whether a point falls within a polygon in 2D. In ...
1
vote
0answers
120 views

How can I draw an ellipse filling the dataframe with ArcPy?

I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
1
vote
1answer
216 views

AddLayer method does not add all bands of .tif image (3 bands total)

I am currently having trouble getting 3-band raster's to display correctly when I call the arcpy.mapping.AddLayer() method. It should be said that I am using a pre-existing mxd template to automate ...
1
vote
0answers
46 views

Remove a Layer using Arcpy [duplicate]

Possible Duplicate: How can I remove a feature layer in an Arcpy Script This question could seem too stupid, but i'm struggling with it, and it cannot work. I have an mxd file containing ...
1
vote
1answer
674 views

Formatting label styles using arcpy [duplicate]

In ArcGIS 10.1, I have a shapefile/layer with labels displayed on a map. Can I modify any of the formatting of the labels using Arcpy? Either directly in code or by importing style from another layer ...
1
vote
0answers
498 views

Variable stored as NoneType in Python with updateCursor

SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType. I am using updateCursor to ...
1
vote
0answers
185 views

ArcGIS 10.0 - How to have GP Service make rest calls instead of Silverlight client?

I have a Silverlight client that densifies a user drawn polyline. The returned vertices from the polyline are then sent to esri elevation sample server for each vertex to find an elevation value. ...
1
vote
1answer
670 views

Dynamic Text in ArcMap 10.0 and arcpy - getting user name in specific format

I need to put in a specific text into a text element. The initials of the user who built the map. With arcpy I am trying to set the text element with dynamic text. If I put <dyn ...
1
vote
1answer
581 views

How to achieve more than basic labelling of Reference Grids (Graticules, Measured Grids) in ArcGIS Desktop?

I'm happy to be corrected, but at the moment I do not think it is possible to meet any of the following mapping requirements using either ArcMap or ArcPy: Label measured grids using a format like ...
1
vote
0answers
248 views

Relate first point and last point of polyline to point feature(s)

I am working on a small script using ArcMap10/arcpy to generate a upstream-downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line. ...
1
vote
0answers
104 views

Copied points not intersecting the original points

I'm using an arcpy search cursor to access a Oracle database. I have a simple Python class that I copy the returned row objects into, which gives me more flexiblity than the cursor. The problem is ...
1
vote
0answers
80 views

getSelectedExtent not working on joined layers

When joining layers the getSelectedExtent function in ArcPy fails to get the extent. Unjoining the layers and running it yeilds the expected result. The joined layers are all located on an SDE. Is ...
1
vote
0answers
49 views

What are the steps to go from raw address data to a locator report? [closed]

I'm a seasoned programmer, but I'm new to GIS in general. I've read a decent amount of ArcPY documentation but haven't seen an example that takes me from raw data to a locator report, from start to ...
1
vote
0answers
652 views

ArcGIS 10.0/arcpy: Can't retrieve the points in a polyline geometry obect: any idea why?

My arcpy script builds a Python dictionary, dictCLPnts, that holds the geometry objects of a polyline feature class. The following code snippet shows the attempt to access the geometry object with ...
1
vote
2answers
958 views

Getting print statements in Python script to print through a batch file

I'm starting to learn Python and batch files. I have a Python script which selects data by location and exports the selection to a new feature class. The script runs just fine - included in this ...
1
vote
0answers
142 views

Arcpy problems regarding convertToMSD() Function

I am having trouble getting the ConvertToMSD Function to work. Technically it works, but not in the long run of my script. I use the converttomsd function to create an msd. I then publish this msd as ...
1
vote
3answers
708 views

Automating capture of Extent from multiple mxds with multiple dataframes

I want to create a single shape file from multiple mxd's that have multiple frame sets with different extents in them. I have found/started a script to do this (attached) but can't figure out how to ...
0
votes
6answers
3k views

batch buffer with python in arcgis 10

Hi friends: i have some feature class(7 feature classes) and I want to batch buffer in ArcGIS 10 . I don't know how can I buffer at once. Please help me. sincerely
0
votes
2answers
89 views

How to return the first row of feature class as a list in ArcPy?

I need to return the first record of a feature class as a list. Is this possible? I can't seem to figure it out using row.getValue() as it does not allow me to put a wildcard in there.
0
votes
2answers
58 views

Naming your Output feature class?

I am working in a work space in python on ArcGIS 10.1 on a remote desktop. Here is my code import arcpy from arcpy import env env.workspace = "E:\Example" PST = arcpy.ListFeatureClasses ("", ...
0
votes
2answers
1k views

Changing field type with arcpy

What I need to do is change data type of a field of a table or feature class. If there are some data, then I need to transfer it, if its possible, if not possible then just set null for that data. I ...
0
votes
3answers
63 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
1answer
45 views

TableToTable gives unexpected character after line continuation character? [closed]

I'm working on updating a python script from arcmap 9.3.1 to 10.2.1 and im getting an error for "unexpected character after line continuation character" and im unable to diagnose the character. ...
0
votes
1answer
208 views

Python workspace

I wrote a simple script to rename about 15 shapefiles in a folder on our local server. When I tested it I was working on a workspace on the C:\ and it worked fine. All our data is on a local server ...
0
votes
1answer
169 views

Why does arcpy.SelectLayerByLocation_management give ERROR 000368: Invalid input data?

When i trying to do Select by location i got : arcgis scripting. ExecuteError: Failed to execute. Parameters are not valid. ERROR 000368: Invalid input data. Failed to execute (SelectLayerByLocation) ...
0
votes
1answer
78 views

Use a variable to calculate a field with arcpy as a script in a toolbox?

stringvariable = "banana" arcpy.CalculateField_management("c:\point.shp", "SUBDIRECT", "stringvariable", "PYTHON") I get an error saying stringvariable is not defined what's the deal? I check ...
0
votes
1answer
308 views

NameError: name 'Con' is not defined

I have 365 rasters with the same extent, and I am trying to sum them together by month. I have the script below, which was working until I added the line out1 = Con(IsNull(raster), 0, raster) which is ...
0
votes
4answers
82 views

Generate_arc — Not familiar with its usage and inputs/outputs

I'm using ArcGIS Advanced in order to generate a coverage (I've never worked with coverages before --nor ArcGIS really, know the basics, but not this). I am trying to write a python script to generate ...
0
votes
2answers
754 views

Execute multiple process in parallel of Arcpy script

I have seen some difficult ways to do parallel processing, but I wonder if it is possible to simply execute multiple process of the same ArcPy script at the same time. My script makes some changes to ...
0
votes
1answer
457 views

How to create a report of all feature classes in a geodatabase?

I am not getting any response from this script and no error displayed at all I am writing this script to help me display the feature classes in my geodatabase Here is my script import arcpy ...
0
votes
1answer
62 views

Iterating shapefiles using ModelBuilder or Python?

What tool can I use to run many shapefiles to intersect with a shapefile as a output? It looks like that Iterate tools is use for feature classes or datasets and I don't see any for the shapefile. ...
0
votes
1answer
39 views

Is there an equivalent to arcpy.ImportToolbox() in 9.3.1?

Is there an equivalent to arcpy.ImportToolbox() using ArcGIS 9.3.1? I'm assuming it would use arcgisscripting instead of arcpy but I can't find any documentation.
0
votes
2answers
188 views

Arcpy zoom to selected features not working

I'm writing a python script to automatically take some snapshots of my ArcMap in 10.2, but I can't get the zoom to selected features tool to work properly. I have a layer called carereport, which I ...
0
votes
1answer
146 views

How to add several layers to the table of contents in ArcMap using Python in one shot?

I am already able to add individual layers to ArcMap table of contents using the following codes: # Adding the layer to the table of contents mxd = arcpy.mapping.MapDocument("current") df = ...
0
votes
2answers
283 views

How to List Tables from current map document (mxd)?

We have many maps containing Feature Classes and Tables in a Personal Geodatabase that need their information updated. Is there a function to List Tables from the current map document like mxd = ...
0
votes
2answers
138 views

ListFeatureClasses brings back more than expected

Why, when I issue the function: fcList = arcpy.ListFeatureClasses(feature_type='point') does it bring back a list of grid/rasters as well as all my point featureclasses from ArcSDE. All I want is ...
0
votes
1answer
941 views

Find and Replace data source script

The following script is supposed to find and replace all shapefiles in a mxd (that exist in the folder) to the new SDE data source. No errors when running the script however, when I open the MXD in ...
0
votes
1answer
39 views

Hiding selected features in ArcGIS for Desktop using ArcPy or ModelBuilder?

I'm using data driven pages to create a series of maps of point features. Some of my features overlap spatially and I only want to show some of them on each map. Once I select the features which I ...
0
votes
2answers
38 views

Check layer data type in gdb

I have path to layer or feature C:\base.gdb\test How to check is table or feature class by arcpy?
0
votes
1answer
93 views

How to write output from subprocess to disk (using multiprocessing)

This code was developed from another question I posted about how to kill an arcpy tool if it takes longer than a specified time. See How to cancel tool execution in python. Using the multiprocssing ...
0
votes
2answers
56 views

Export Raster Data to TIFF, BMP, or PNG File Using Python

I am writing a Python script to export a Raster Dataset to a TIFF, BMP, or PNG file, as I would manually by right-clicking on the layer, choosing Data | Export Data, and then make my choices in the ...
0
votes
1answer
78 views

Summing column values in table using arcgisscripting?

I need to create a python script that sums a column's values in a table. Thereafter, the script is supposed to get the percentage of each individual row in that column and populate this percentage ...
0
votes
3answers
35 views

FeatureClassToFeatureClass_conversion in ArcGis 10.1

I have many > 60 .dwg files I want to convert just the polyline parts of these and have put together a list of python commands using excel to get something like this: However when I try running ...
0
votes
1answer
54 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 ...
0
votes
1answer
53 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?: ...
0
votes
2answers
92 views

Python script to check node / edge coincidence

I have written a script with arcpy to test node and edge coincidence. Each edge (line) should have a node (point) at either end. If this is true, the script does not write anything. If there is node ...
0
votes
2answers
141 views

How to use Field Value from arcpy.GetParameterAsText()?

I want to to is have a user select a feature class, which then populates the fields that can be selected (this works), create a new field in that feature (works), and then populate the new field with ...
0
votes
1answer
54 views

How to programatically create point and use it in Select by Location query?

I have a section grid for a US state. I also have a quarter/quarter section grid which splits the section grid into 16 equal squares. I have written a Python script that finds the XY coordinates of ...
0
votes
1answer
344 views

Dissolving shapefile python script not working, syntax help please

I do not understand why this simple script won't work. I can get it to dissolve in model builder but not from a script that I run from inside the map document. My output results are 4 polygons, just ...