Tag Info

New answers tagged

0

Ok, I played around with this a little bit and could not get the openDocument or newDocument events to fire. I was able to get the startup event to fire and tested by creating a text file. I am on ArcMap 10.3.1 and Win7 x64. Here is my code: import arcpy import pythonaddins class Py2(object): """Implementation for ArcGISAddIns_addin.extension2 ...


0

After many trials and tribulations, I have got a working code with many bells and whistles that I feel obliged to share since they are a culmination of many 'stolen' snippets obtained from this site. I have included comments in much of the script to describe what is going on, so hopefully that is helpful. Basically, I was able to get both a ...


0

From my experience it seems that the syntax "with arcpy.da.UpdateCcursor" (ie the use of a Python "with" statement for a cursor) in the code of a Python Add-In causes problems. I didn't check if using a arcpy.da cursor without a "with" statement works. The following code example use a "normal" UpdateCursor (arcpy.UdpateCursor, not part of the arcpy.da ...


1

To do what you describe will, I think, need you to code using ArcObjects instead of ArcPy (or arcpy.mapping) because you appear to be wanting to customize the ArcMap application. From Who is arcpy.mapping for? Why was it built?: Arcpy.mapping is not a replacement for ArcObjects but rather an alternative for the different scenarios it supports. ...



Top 50 recent answers are included