A python API created by ESRI to perform geoprocessing and layer management.
2
votes
2answers
87 views
Help with Python and adding a grouplayer to arc, renaming it from a folder name, then adding layers to it from that folder
I am trying to use os.walk to go through a directory tree, pull out all the .shp files in it, create a grouplayer in the mxd, rename the grouplayer the folder name, then add the layers from that ...
1
vote
1answer
60 views
A simple Python Script to save the currently opened mxd and changes
Here is what I have so far...
import arcpy
import arcpy.mapping as map
mxd = map.MapDocument()
mxd.save()
And yes I know that map.MapDocument requires an argument, but I want it to automatically ...
1
vote
0answers
71 views
How to embed a PDF into an Excel spreadsheet? [closed]
This is what I want to do:
Create report using a polygon feature class to output areas of polygons using some logic and the ExportReport() function (This I have accomplished)
Create a PDF of the ...
2
votes
1answer
45 views
How can I set the settings of an Address Locator within a Model or arcpy?
I am creating a model that processes a large road dataset, then creates an address locator from the roads. The Create Address Locator tool does not allow me to set options like Spelling Sensitivity or ...
1
vote
1answer
54 views
How to get an attribute of the selected feature and pass it into a URL?
As a total Novice with Python, I thought 2 weeks would be enough time to learn how to build some tools for our GIS... I was wrong and I'm running up on a deadline.
I am attempting to get a value ...
1
vote
0answers
30 views
arcpy & TraceGeometricNetwork return ERROR 000584
I am developing a script to automate the creation of a road network following varying criteria.
I have created a geometric network and I would like to get the connection between several points with ...
0
votes
0answers
34 views
Create annotation layer with follow feature option set as default
I would like to create an annotation layer that has the "follow feature" option as the default. I've looked all over and can't seem to figure out how to do this from the initial annotation layer ...
0
votes
1answer
32 views
How to Average neighboring county data and store in original?
I have data for several rain stations, i have averaged the data and given each county a value. Some counties have null values and I would like to pull the data from the all the bordering counties and ...
-3
votes
2answers
84 views
What does Runtime error : 'NoneType' object has no attribute '<field_name>' mean?
Here is my code
#arcpy
import arcpy,sys
from arcpy import env
env=r"C:\Users\Jaya\Desktop\python_practice"
totalRec=arcpy.GetCount_management("river")
rows=arcpy.SearchCursor("river")
...
1
vote
2answers
105 views
How to list Feature Classes of Multiple geodatabase in Multiple Folder?
I'm new in python scripting and try to list polyline feature classes of multiple Geodatabases. The Geodatabases are in many nested folders.For example in folder "A" I have 20 folders and in each ...
1
vote
1answer
43 views
Append to rather than overwrite to a single table in arcpy
The code thus far works to create multiple output files, but I'd like to set it up so that the data is all exported onto a single table across multiple rows. The issue is I believe with the part in ...
0
votes
0answers
53 views
ArcGIS opposite to pivot table
fellow GIS-ers :)!
I've been trying to find a tool to do the opposite to what the "pivot table" tool does but I dont thin there is any tools for that. I have a raster data set derived from Landsat ...
3
votes
2answers
118 views
Csv to Shp conversion? [duplicate]
I am working on a really big script right now where I have a csv file that I have removed rows and columns from, and edited the headers. I need to create one big shapefile for the entire csv file then ...
1
vote
1answer
53 views
arcpy: can I use SelectLayerByAttribute to compare fields from joined tables?
I can't figure out the syntax to select table records where one field's value exceeds that of another. The fields are from a pair of table views connected w/AddJoin(). One view is of a fgdb table and ...
1
vote
1answer
48 views
Make Table View with field_info Output
I am using Make Table View to copy data from one table to a table view object and in the process hide and/or rename some fields. When I output the data to a dbf it hides and/or renames the fields ...
2
votes
1answer
51 views
Clipping buffers to census tracts
I have donut buffers generated to protect anonymity of household locations. They need to be clipped so that they are only inside the census tract that the original point was in. The code takes about 8 ...
2
votes
1answer
76 views
Arcpy: Troubleshooting parameter error for Export Report
I'm running into what I believe is a parameter error in writing an arcpy exporttoreport script. I've written several successful scripts of this same type, but the difference is that this one has a ...
0
votes
1answer
54 views
Error: Exception Raised on the “for row in rows” command line?
I am comparing fields in layers. I have the AADT layer and AADTAnno layer and I want it to search the fields FLAG and TFLAG. For Example: If there is a 29C9 in AADT layer in FLAG fields then there ...
5
votes
1answer
94 views
How much database bloat is reasonable?
I use personal geodatabases to hold all the data for my projects (probably around 10-20 feature classes across 2-4 datasets on average). I use the personal gdb because I like being able to hook into ...
4
votes
2answers
86 views
Arcpy memory leak
I'm trying to import a great number of csv files of about 250MB each. I wrote a python script for that as follows:
import gc
import glob
tables = ...
2
votes
1answer
73 views
How to efficiently check for feature overlaps with Arcpy?
In an effort to reduce processing time, I am looking for ways to pre-process data within my script. I have ~18,000 featureclasses with ~500 features each (all simple circle polygons) from which I want ...
1
vote
0answers
52 views
Are polygons created in Arcpy built in any order?
My script uses a search cursor to evaluate polyline coordinates and build polygons based on those coordinates. The script works well, but I am curious as to whether anyone knows the order (if there ...
4
votes
1answer
60 views
Switching between background 64 bit processing and 32 (so I can use 3rd party ie XTools)
I often run scripts now with 64 bit background processing enabled but when I want to use certain tools like Xtools table to text I have to turn it off as these tools are 32 bit. Is there a way to ...
1
vote
0answers
31 views
Cancel event in Python Gp tools with arcpy
In GP-tools written in C# (ArcObjects) we can listen for the Cancel-event and react on that. I wonder if there is anything similar in Python GP-tools applying arcpy.
I googled that issue and the only ...
7
votes
1answer
77 views
Reduce processing time in Erase function using Arcpy in IDLE
I am processing 18,000 feature classes (saved in a file GDB), each with ~500 records (polygon features) in ocean areas, and I am running a script to remove area overlapping with the coast, using the ...
2
votes
2answers
78 views
Trying to use an integer in a WHERE clause
I'm trying to use an integer value in a WHERE clause (looking at an integer field).
expression = "'SERVICE' = 'Service' "
expression = expression + 'AND '
expression = expression + "'GPS_TIME_TOTAL' ...
1
vote
1answer
38 views
arcpy.mapping Graduated Colors Symbology
I'm trying to figure out how to apply graduated color symbology to a feature class by using arcpy.mapping in ArcMap 10.1.
To start, a script runs and a feature class is added to a map document, no ...
1
vote
1answer
28 views
ArcPy: DDP Error in exporting only occurs with “SELECTED”
I'm trying to use DDP (Data Driven Pages) and am running into a problem. I'm using arcpy.SelectLayerByAttribute_management to select a series of records, and then trying to use the ...
-1
votes
0answers
18 views
arcpy: AddJoin on text field [closed]
I posted a question over on stackoverflow, but maybe it should be here. I'll just drop the link here. Thanks for any help!
http://stackoverflow.com/questions/16174754/arcpy-addjoin-on-text-field
2
votes
2answers
69 views
Why does ArcMap crash if I try this Join Field (which ArcPy does not like either)?
I'm a little uncertain whether this question belongs here or on http://gis.stackexchange.com
Have an "AddJoin" that results in no shared records, which is not what I'm expecting. Is it because I'm ...
0
votes
1answer
47 views
ArcPy: Possible to use wildcard in .pdf append?
I'm working on a script that (as written) produces a large number of individual pdf pages (>100), instead of hardcoding the names of each of the outputs, I was thinking of using a wildcard. However, ...
2
votes
1answer
60 views
ArcPy: No Label appear on .pdf output but are present in Layout
Do labels needed to be coded into an arcpy script in order to be visible on an arcpy .pdf output? In ArcGIS the labels are visible for various features, but when I use the arcpy script (either in IDLE ...
5
votes
1answer
130 views
ModelBuilder: How to extract data by date, export to separate tables and interpolate tables to rasters
I've been using ArcGIS for a couple years, but when it comes to model builder I've only worked with very simple models. I'm hoping someone that is much smarter than myself can help me in building a ...
1
vote
2answers
42 views
Problem saving after CellStatistics list ERROR 010240
I am having trouble saving outputs from CellStatistics but only when I run it on a list of rasters. This was working on python 26 but not 27.
I know this example is nonsense, but:
env.workspace = ...
1
vote
1answer
80 views
Does Identify tool of ArcGIS for Desktop have Python script behind it?
Can anyone let me know the Python script for "Identify" tool in arcmap10.
I need to create a customized script tool for that and add in a toolbar..
Pls help...
0
votes
1answer
67 views
How to Export to PDF after zooming to extent of each feature that meets SQL where clause?
I realize that I've asked two similar questions recently, but following suggestions in the comment chain, I'll make this a separate question (separate as it is not the no output problem in ArcPy: ...
3
votes
2answers
42 views
Is it possible to have tool parameters appear only if clause met?
I'm writing an arcpy script for a tool that has a large number of parameters (around 10).
About half of these are "dependent" (perhaps not in the technical sense of the term), as in [first ...
1
vote
1answer
67 views
Calculate Field using Esri Python Addin
I am trying to select a polygon then it must automatically change (calculate) the status to "C". The tool seems to work in the background but nothing actually happens (the status is not updated). I ...
-1
votes
2answers
74 views
ArcPy: (SearchCursor/export to tiff ) with no output [closed]
I'm trying to write a script that uses a search cursor to loop through a field in a .shp file (Incident_Z) find every value that meets a specific condition (zip code=10004) and then at a scale of ...
1
vote
1answer
54 views
Why does this SQL syntax produce empty feature class with ArcGIS Select_analysis?
I'm working on a script that involves an arcpy.select_analysis function. The problem I have is that when I run the script it produces an empty file. I've verified that the whole thing works when in ...
0
votes
1answer
35 views
ArcPy: Error in For loop panToExtent + export to Tiff
I'm trying to trouble shoot a script, which has the objective of allowing a user to input a query for selected field, use the panToExtent function to pan the data frame at the specified scale to that ...
1
vote
2answers
116 views
What is causing - Arcmap errors (010302/010067) while using 3D analyst/CutFill? [closed]
I'm using the Cut/Fill tool in 3d analyst to measure the volume of a feature, but I'm getting the following errors:
ERROR 010302: Unable to create the output raster: C:\Program Files ...
4
votes
5answers
119 views
ArcPy - Can Radio buttons be added to a Script tool?
I have 3 Point shapefiles for 3 species that contains the accession points of each.
The user needs to specify only one species at a time. I need to write a script tool for adding the selected Point ...
2
votes
1answer
34 views
how to calculate raster layer statistics using arcpy?
I'm trying to write a script that will, in part, calculate statistics for a raster layer in an Arcmap mxd, but when I run the script I get an "invalid parameter" error (Error 000840), saying that the ...
3
votes
3answers
147 views
How to convert geometry to WKT using ArcPy?
I would like to be able to convert a single feature (or potentially many features) in an ArcGIS layer into Well Known Text (WKT) format during a geoprocessing operation using Python and ArcPy (no ...
0
votes
1answer
38 views
Arcpy CreateUniqueName usage: keep original input names
This is a continuation of the question I asked here:
At this point I'm really just trying to get everything in one place and keep the original shapefile basename. I'll tackle merging like-named ...
0
votes
0answers
33 views
how to access a feature class in SDE using arcpy [duplicate]
I am new to Python and Arcpy. I am trying to access the SDE server to extract some information from feature classes that reside in the server database. I know the name of the feature class and I also ...
2
votes
0answers
38 views
Difficulty in running the script
I have developed a script tool for adding a layer in the current map document.
It did not work.. The message is "Completed script addlayer...". But there were no layers added in the TOC.
Another issue ...
0
votes
0answers
46 views
Create Vertex and add empty attributes to it
How can I create a vertex(and then a point feature on the vertex) on a polyline and give it some empty attributes(create fields), move an existing vertex, delete vertex? I am in ArcGIS environment and ...
2
votes
1answer
37 views
ECWs missing when exporting MXD to PDF with arcpy
I'm trying to export some MXD maps to PDF with arcpy (ArcGIS 10.1). Everything works fine and dandy except for ECW images, which don't appear in the PDF. However, when I execute the same code from the ...


