Tag Info

New answers tagged

4

It would be better to remove the layer using arcpy.mapping.RemoveLayer. The parameters are the data frame to remove the layer from (possibly a group layer if you are trying to remove from a group) and the layer itself, this alleviates any chance of confusion: def onClick(self): mxd = arcpy.mapping.MapDocument("CURRENT") df = ...


0

I've personally had little experience in using a Python AddIn as I would have approached this problem using ArcObjects and VB .Net. You specifically mention editing and not liking debugging in Python. You could create an extension that would listen out for the starting and stopping of an edition session. Once started it could log the tracking of your ...


2

Sounds like you're looking for the valueField property in the UniqueValuesSymbology class: http://resources.arcgis.com/en/help/main/10.1/index.html#/UniqueValuesSymbology/00s30000005s000000/


3

I found the answer here: deactivate() is not a function that's intended for you (the programmer) to leverage. It's a function leveraged by the application so that ESRI tools can deactive it when they are selected. Otherwise, you'd never be able to select another tool. In order to do what you're trying to do, you'd also need some sort of activate() ...


3

If your code just finds and executes the Start Editing command item then ArcMap will start an edit session and launch the Editor toolbar. There's probably a whole bunch of code behind that control. To start an edit session without launching the toolbar you'll need to start editing a workspace in the map via IEditor.StartEditing. Here's some retro VBA code ...



Top 50 recent answers are included