Python Trace Geometric Network
Not sure why they post in the Desktop/Online help that this can be run via a standalone python script because the output is a group layer which isn't a data type that can be written out by python. The...
View ArticleField calculation - python newbie
Hiya, Wondering if anyone can help with this - I'm trying to reclassify a field. I've never used python before and have attempted a script which isn't working. There are three fields (all floating...
View ArticleAdding symbology from a .Style file
Hi everyone, We have recently started automating our processes and have encountered a stumbling block. We use ArcGIS 10 with service pack 5. The problem is: we a project for every new dossier. And for...
View ArticleTwo searchcursors and updatecursor in feature table
I have started looking at Python in Arcgis. My aim is to build water hydraulic model from digital cadastre using model builder. Water cadastre is broken into many small pieces. Each sector (pipe) has...
View ArticleError when trying to calculate a field
Anyone tell me why this code is returning this error? It creates the latTemp field, and I can see it after it crashes, but it will not calculate it. ERROR: Code: <class...
View Articleif function within an while - python novice
Dear all, I'm attempting to calculate a field value that is dependent on a number of other fields. In the following example I'm attempting to calculate values for FIII dependent on the relative values...
View ArticleBatch_Extract_By _Maskes with one raster and multiple shapefiles
Hi All, I am very noob to python scripting and today i figure i take a crack trying to write a script but for some reason my script does not work. Essentially, I'm trying to extract a DEM Raster file...
View ArticleUnhashable type list errors
For the following code, lines 79 & 97: I am trying to send emails to multiple addresses. But I am receiving this error: Runtime error <type 'exceptions.TypeError'>: unhashable type: 'list' I...
View ArticleNear Tool Script
Okay. My script is running but it is taking for ever! The percent bar on the bottom of ArcCatalog is still at 0%, hopefully this script ends up working. In the meantime I was hoping I could post it...
View ArticleHow to loop a function with a different input file ?
Hi All, I am very new to python scripting. I have a script in which outputs a statistics when I execute it in Python Idle. My question is how do I incorporate a code in which will allow me to loop the...
View ArticleArcpy Python ID autocomplete
Hello Everyone, Recently I've been attempting to automate certain processes using python. The python command line in 10.1 has a very robust auto complete feature that automatically shows specific...
View Articlearcpy.management.GetCellValue returning NoData
Been struggling with this for a couple of days now and could use a fresh set of eyes on the problem. I'm trying to get an elevation spot value for a DEM file. When I inspect any point with the...
View Articlearcpy points in polygon check
Hello, I have a list of points and a list of polygons both in a separate shape files. I am trying to write a ArcPy script to loop through the points, and then the polygons respectively and tell me when...
View ArticleArcGIS 10.1 python add-in usage of arcpy.GetParameterAsText
Hello to everyone, is it possible to use arcpy.GetParameterAsText() for User Input e.g. for a table or a name of a featureclass? Code: def onClick(self): # Script arguments import_file...
View Articlearcpy.select invalid sql statement
Hi The following script is giving a syntax errror on the arcpy.Select line. I've tried various combinations of Quotes but I still get the invalid sql statement. Any ideas? # Import arcpy module import...
View ArticleOrder neighboring polygons by attribute value
Hello, i am trying to speed up a tool we have built. The slowest part is the ordering of neighboring objects based on the lowest attribute value. Current logic is currently: 1) select a polygon based...
View ArticleRead from map view
Hi I need to create a python script to add a raster layer to the biggest extent in the map view. For instance, I zoom into an extent in the map, now the python script must add a raster only to the...
View Articleprint arcpy.mapping.ListLayers confusion
Hi. I'm a little confused and I want to understand this better. If I enter: Code: arcpy.mapping.ListLayers(mxd)[0] ...the python console returns <map layer u'A'> If I enter: Code: print...
View ArticleCompiling/batching python scripts?
I have 7 scripts that I have exported from Model builder. I want to run these in a particular order so that our laptops GIS updates. How do I batch? or compile? These together so that they run in...
View Articlepoint prediction
Hello everybody, I have 7 points (x,y coordinate is known) each point represent a position of the same object in a specific time of the year (say January 1984, January 1986 ,January 1999.....) [See...
View Article