Python add-in development - changes to code don't make it into ArcMap
Hi, I'm writing/maintaining an add-in and finding that debugging is near impossible because I can't clear out old add-ins. Here's my workflow: 1) write/edit add-in code 2) remove add-in from toolbar,...
View ArticleGetCount_management seems to crash ArcGis
Not sure if I am posting this in the right forum. Has anyone created an addin that performs a record count? I have an addin that I am trying to create that has a record count at the very start and...
View ArticlePython CalculateField sometimes doesn't work depending on field value variable
I'm trying to add and calculate a text field in an existing dbf table by using a variable to set the value of the field. The AddField code is working fine. The CalculateField code sometimes does not...
View ArticleField scale (decimal places) issuse
I noticed that when using arcpy.CalculateField_management in python on a feature class it's changes the field scale (decimal places). I had a shapefile with an Acres filed of field scale of 3 but now...
View ArticlePython code works in ArcGIS 10.0 but not in ArcGIS 10.2
I know the there is anew version of Python that is running on arcGIS 10.2 Pythin 2.7.3?? Anyways these are simple out of the box functions that work in 10.0 but now not in 10.2 Here is the code...
View Articlewhat is self.cursor
I am very much a newb, please bear with me. I have a two whole scripts on the completed side of my wish list. Now I am studying up on addins, because they seem to have some mouse functionality I desire...
View ArticleCreate a list and iterate with the tool arcpy.MinimumBoundingGeometry_management
Hello and Happy New Year to all, I work with a document .mxd. All my data from SDE. I would like to put these data into a list and then iterate with each tool...
View ArticlePython Add-In ESRI Digital Sign Utility
In using the ESRISignAddIn.exe utility, I have encountered an error. Add-In is functional. I copied the ESRISignAddin.exe over to my ArcGIS\Desktop10.2\bin folder. When I run the utility, I choose my...
View ArticleGeoprocessor Programming Model?
I came across this Geoprocessor Programming Model for ArcGIS 9.3 http://webhelp.esri.com/arcgisdeskto...ocessor_93.pdf I was wondering if something similar is available for ArcGIS 10.2?
View Articleimport arcpy not working in PythonWin
Hello, I'm trying to learn to Python but am stumbling at the first block. When I try to import arcpy I get the following error message: Code: >>> import arcpy Traceback (most recent call...
View ArticleApplySymbologyFromLayer_management Not Updating Layer
import arcpy import arcpy.mapping import datetime import os arcpy.env.overwriteOutput = True I've been struggling with this for a few hours in a rather large script, so I trimmed it down to just a few...
View ArticlePYTHON CODE TO CHANGE DASH VALUES TO DEGREE MINUTE SECOND
I'm a novice in programming and would appreciate if somebody can provide me with a Python code that can convert the values in my cogo "Direction" field in the "180-0-0" format to the degree minute...
View ArticlePyhton script for changing datasource in MXD
Hi, I wanted to change the datasource of layers in my mxd but my script is not doing this. I am using below: lyr.replaceDataSource(layer.workspacePath,"SDE_WORKSPACE",newFeatureclassPath, False) Please...
View ArticleAdding random spatial error to addresses using python?
Hi. I have geocoded a list of ~2,500 survey respondent addresses and now want to add random spatial error to each location based on underlying population density while also retaining points within...
View ArticleTurn off layer if attribute is empty
Hi, I am fairly new to python script. What I want to do is to look at a group of layers in my mxd document and turn them off - visibility=false, if its attribute table is empty. Any help is much...
View ArticleDetect active tool in Python add-in
Hi there, Can anybody tell me if there is a way to detect the active tool within a python add-in? I'm intending to use the onCurrentTaskChanged event but I only want use it when the user is using a...
View ArticlePython Script Tool Validation errors
I am currently creating a python script tool at work that works fine, and could be even more polished if I can get certain functionality working using the tool validation. I am trying to get the tool...
View ArticleSetting a definition query
Hi gang, For some reason I can't get this code to work. I'm simply trying to set a definition query on a layer. The pertinent code is: Code: mxd = arcpy.mapping.MapDocument("CURRENT") theProj =...
View ArticleWant Python code for what Calculate Geonetry tool does for xy to meters
Hello I have points with XY coordinates in GCS84 and need to convert them to meters before extracting raster cell values from the points. I know I can do this with the Calculate Geometry window from...
View ArticleApplySymbologyFromLayer Not Working for Raster Mosaic Dataset
I am thoroughly flummoxed with this issue! I've created a set of daily surfaces representing groundwater levels. I want to step through them in time (i.e., make them time-enabled). I found a good site...
View Article