2
votes
1answer
47 views

Conditional SQL Query

I've been running a code that searches a desired field in a feature class and performs an specified SQL query based on whether the field is string or double. The variables are just temporary fillers ...
1
vote
0answers
94 views

Why do I get different results running a script in PyWin and loading it to the Python shell in ArcGIS? [closed]

I've been trying to teach myself Python scripting for ArcGIS and have gotten frustrated on multiple occasions when I try to debug my script endlessly, only to later find out that it actually works ...
2
votes
0answers
43 views

Near Analysis takes much longer in ArcPy? [duplicate]

I have a feature class of about 12 points, a feature class of hundreds of roads, and need to find the nearest road to each point. So the obvious solution (Near tool) takes about 20 seconds, and the ...
2
votes
1answer
97 views

Embedded python script module import issue

I have two ArcGIS python scripts. One is a primary python script that calls a number of functions from a second python script. Everything works well, i.e. primary tool calls and uses functions from a ...
2
votes
1answer
34 views

How to Set the width of a dropdown box?

I have created my own script in ArcGIS 10.1 and for one of my parameters I have a drop down list that the user has to select from. The longest entry in that list is only 6 characters, but the width ...
1
vote
1answer
162 views

How to avoid setting env.workspace and other paths/settings all the time

I have some scripts that are constantly setting env.workspace of arcpy. Usually, I have a caller script(script1.py) that may call some other script (script2.py). I've created a file globals.py with ...
1
vote
2answers
163 views

Median value for a case within ArcGIS 10.1

Similar to this post (ArcGIS median value from a layer) I am looking for a toolbox to get the median value for a data field by a case. For example, say I have dataset with percent tree cover for each ...
1
vote
0answers
39 views

Is it possible to create a geoprocessing package from a script tool that runs and EXE?

Following the guidelines from the following link, you can create a script tool from an executable . . http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000003t6000000 ...
2
votes
1answer
481 views

Incremental “auto save” in ArcMap edit session

Is there any way to add automatic incremental saving to ArcMap 10.1 editing sessions? I found this script for 9.x but it doesn't seem to work with the newer versions. I'm looking for a script or add ...
1
vote
1answer
199 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...
3
votes
2answers
582 views

ArcGIS script tool: Can you have an input parameter set to optional and have the tool work when an input is not provided?

I'm building a script tool that processes shapefiles ( GPS data collected on weekly basis). The tool is set up to take an input for each shapefile ( in this case Sewer, Storm, Sign). On some days, ...
0
votes
1answer
462 views

Invalid topology error when running script

I am trying to run a python script and I get an invalid topology rule when I get to the feature to line tool. I am using arc 10.1 but I think the script was written in 10.0. I know it was built in ...
1
vote
1answer
98 views

arcpy.sa.CostDistance from Python gives error about number of args but executes fine through Toolbox

I am attemping to call arcpy.sa.CostDistance to calculate the cost distance to a source point as well as generate the optional Cost Back link raster: arcpy.sa.CostDistance("input", cost, "costDist", ...
9
votes
1answer
3k views

How to export only certain columns to a CSV file in ArcGIS?

I've written a python script using arcpy which outputs a polygon feature class into a File Geodatabase. I have added a function to export the attributes to a separate CSV file. I am using the code ...
5
votes
2answers
624 views

Describing a coordinate system in arcpy

I have a python script in ArcGIS 10.1 which takes in a few inputs from the user. One of the inputs is a coordinate system. I would like to test whether the coordinate system the user chose was ...
3
votes
1answer
249 views

How do I stop GP script from adding temporary data to Table of Contents?

I have a script that does a series of calculations, producing temporary data along the way. However, at each step of the script, data is added to the TOC and then removed when I call the ...