How to add multiple text elements in ArcMap using ArcPy
I’ve been able to add a dynamic text element (with an element name of ‘TestName’) that reflects a layer name and that changes for each corresponding exported layer to a GIF. I am now trying to add a...
View ArticleDebugging ERROR 000358: Invalid expression from SelectLayerByAttribute?
I’m creating a script tool and using the SelectLayerBy Attribute function (below), arcpy.SelectLayerByAttribute_management("cities_lyr", "NEW_SELECTION", '"CRIME_INDX" <= 0.02') However, I keep...
View ArticleMulti-selection from Combo box in Python AddIn?
Is it possible to select more than one option from a combo box list in python Add ins for ArcGIS 10.x? Here is part of the code: def onFocus(self, focused): if focused: self.mxd =...
View ArticleUsing Python to output table of intersecting polygons in ArcGIS for Desktop?...
I have two polygon layers: routes in a transit system with a quarter-mile buffer draw for each route and the number of daily trips on that route, and Census data at the Block Group (BG) level. What I...
View ArticlePython script iterator to interpolate accross multiple fields of attribute table
I interpolated precipitation data in ArcMap (ver. 10.2) using a surface-fitting tool [e.g. Global Polynomial Interpolation (GPI)]. I built a GPI model using model builder in ArcGIS 10.2, but the model...
View ArticleLimit to number of items using 'IN' SQL syntax in arcmap/arcpy?
I’m writing a python script that uses 'NOT IN ('a', 'b', ...)' statements on very large lists (like comparing 500 items in one feature class against >10k items in another) and am getting weird...
View ArticleAttributeError: 'NoneType' object has no attribute 'split' from arcmap only
I’m running a simple python script from arcmap that sends an html post and processes the response. This script runs just fine from pythonwin but for some reason I receive the following error when...
View ArticleHow can I alter the value field in a raster?
I’m using ArcGIS. I have a raster with angles in the value field. But the value field is type long integer. I would like to change it to float. Is that possible? Some more details: I’ve started with a...
View ArticleTrying to make many polygons from points? [closed]
I am trying to turns points into polygons, but I encounter this challenge : My data set has 1000 entries. Each entry has 360 associated columns, each with a coordinate pair. When connected, these...
View ArticleZoom/Pan function in python addin tool
I have created one python addin tool which creates some points along a line, it works good. my problem is when my tool gets activated i am not able able to zoom/pan the map. map view just get stuck...
View ArticlePass sql expression with GetParameterAsText to SelectLayerbyAttribute in .py...
With Arctoolbox and python scripting I’m creating long tool, but one of the steps is to select by attributes with SQL expression. Let’s imagine that: featureCar = arcpy.GetParameterAsText(0) is Data...
View ArticleI only know how to turn off the entire current layer. But I want off only...
I only know how to turn off the entire current layer. But I want off only some of the layers specified #turn all layers in current map doc on: print "Button2--turn on layers" mxd =...
View ArticleCreating button on Python AddIn toolbar to run python script when clicked?...
I need to create a button on toolbar of arcgis 10.2 who run a python 2.7 script created before when I click. Then I need to know if it’s possible in this button that script write results to an excel...
View ArticleListing Points Within Polygon for Hadoop? [closed]
I am very familiar with a point in polygon analysis but instead of counting how many points are within each polygon. Does anyone know how to list the points within the polygon and add a field that...
View ArticleCannot get correct result for output [on hold]
The attached is my Code and explanation of what I need to do. I need to add more extra function for this and get my final output result. Here is the code and explanation. Example: GDB has [A,B,C,D] – 4...
View ArticleMonitor open sde connection
How can I monitor the open ArcSDE database connections without sdemon? I need to see at any time how many sessions are consumed from my app and if they are related to ArcGIS. I use Oracle 10.2.
View ArticleDissolve Management in Python
I have a simple code that is pulling together polygon shapefiles from a Windows folder and merging them together into a single shapefile. In the same code, I want to add a dissolve command. My fields...
View Articlearcpy raster to polygon without merges (or assign autoincrement values to...
I have a raster dataset (tiff) and I want to get a shapefile (polygons) that preserves all cells. Unfortunately, the Raster to Polygon tool automatically merges all adjacent cells with the same values....
View ArticleDebugging looped python script (updating picture element link)?
Can anyone help with the following script? It’s goal is to list every mxd in a folder, list picture elements in them and the change the path for a specific element. Here’s an update version of the...
View Articlepermissions problem with creating a new text file from the python interpreter...
I’m attempting to create a .txt file as the output from a larger python script I’m running within ArcMap. The code I’m having trouble goes like this: x = open('adfd.txt', 'w'), and my error message...
View Article