11 votes
Accepted

Prevent newly created feature class being automatically added by ArcPy (Python AddIn) to Map Document?

Try unchecking the 'Add results of geoprocessing operations to the display' in the Geoprocessing Options in ArcMap. You can also access this option via the addOutputsToMap property of the env class: ...
user avatar
  • 9,567
8 votes
Accepted

How to store Python Add-In menu customization/configuration in *.esriaddin file?

An .esriaddin file is just a ZIP-compressed archive containing the files that make up your add-in. You can open it with something like 7-Zip to prove this to yourself. The Essential Python Add-in ...
user avatar
  • 35.4k
8 votes
Accepted

Clear combo box in ArcMap Python Add-in

As mentioned in the documentation, you can refer to other 'types' by using the appropriate ID. This is what you set in the wizard when creating the combo-box, button, etc. and you can change it by ...
user avatar
  • 6,146
7 votes

Installing an ArcGIS add-in on several PCs

You can also deploy addins by copying the .esriaddin file to a network location and telling the addin manager to search this folder. This location can be added to every PC in your organisation using ...
user avatar
  • 1,776
7 votes

Getting layer name of selected features with ArcPy?

The pythonaddins module has a function to do just this, GetSelectedTOCLayerOrDataFrame(): >>> import pythonaddins >>> sel = pythonaddins.GetSelectedTOCLayerOrDataFrame() >>>...
user avatar
  • 12.6k
7 votes

Where to download python add-ins?

ArcGIS Code Sharing seems to be the site that you are looking for. It claims to enable you to: Search, browse, and use code, scripts, models, add-ins, widgets, and more. There were 48 results ...
user avatar
  • 63.8k
6 votes
Accepted

ArcPy / ArcMap 10.2: How to report data to user?

pythonaddins is limited in reporting and displaying attributes to users. pythonaddins is mainly a way to offer python developers a way to interact with user events. That being said the main mechanism ...
user avatar
  • 3,206
6 votes

How I can do event with two clicks using python add-in wizard?

Yes you can, you could do it by adding a global variable that keeps track of your clicks. For example: class ToolClass2(object): """Implementation for Test_addin.tool (Tool)""" def __init__(self): ...
user avatar
  • 427
6 votes

Prevent newly created feature class being automatically added by ArcPy (Python AddIn) to Map Document?

I think you can use the addOutputsToMap (=False) property from the env class in arcpy. Further details here: http://resources.arcgis.com/en/help/main/10.2/index.html#//018z0000004s000000
user avatar
  • 560
6 votes

Adding separator in ArcGIS python add-in toolbar?

You will need to edit your config.xml and add: separator="true" to the button that you want the separator to appear before, like I have done near the end of the line of code below: <Toolbar ...
user avatar
  • 63.8k
6 votes

ArcGIS crashing with Tkinter?

Tkinter is not compatible with any version of Arcmap desktop. As a script you are running pure python, and not using the ArcMap desktop application at all, which is why you are seeing different ...
user avatar
6 votes
Accepted

ArcMap crashing when plotting features with matplotlib few times via Python AddIn?

I think, It's most probably about Python GUI (especially Tkinter). Matplotlib uses Tkinter by default. I couldn't figure it out why, but If I change GUI package for matplotlib to PyQt4, no more ...
user avatar
5 votes
Accepted

Using Python Add-In to delete/remove ArcMap layers that are turned off?

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 ...
user avatar
5 votes
Accepted

Number of items in a Combo Box

There is no property that defines the number of items that can be shown in the ComboBox. Instead, use the onFocus method to append the layers in the TOC to the drop-down list. def onFocus(self, ...
user avatar
5 votes

Installing an ArcGIS add-in on several PCs

If you already packed your addin to an .esriaddin-file (which is nothing but an archive-file similar to ZIP or others) all you have to do is copy the file to your client-PC and install it by double-...
user avatar
5 votes
Accepted

deleting Broken Source from arcgis toc with python addin

There is property isBroken - Returns True if a layer's data source is broken. for layer in arcpy.mapping.ListLayers(mxd, "*", df): if layer.isBroken: arcpy.mapping....
user avatar
  • 1,521
5 votes
Accepted

unable to change the work space using arcpy

I had this problem before. There are two solutions: You need to set the result of the geoprocessing tool "CreateFileGDB" as a variable using arcpy.getOutput method. Another way to set the GDB ...
user avatar
  • 2,261
5 votes
Accepted

ArcGIS 10.0 Addin install error?

The documentation states: Add-ins are not backward compatible. Add-ins targeting 10.1, for example, will not work with 10.0 but will work with 10.2. Considering that ArcGIS 10.0 is old enough to ...
user avatar
  • 18.9k
4 votes

How to get the editor's current layer in ArcPy?

As of 10.3, there are new attributes on the Extension object that may be of use to you: the Extension.currentLayer and Extension.editSelection properties.
user avatar
4 votes
Accepted

Can ArcPy fill forms in Add-in interface?

I've never used Python Addins but the interface you describe is a Script Tool. A discussion about calling Script tools from Addins is found here. As @Barbarossa comments above you can use tool ...
user avatar
  • 39k
4 votes
Accepted

Clearing Combobox in Python Addin?

So, just to follow up on what Luke said, I created (see below) a very simple example that makes a pull-down of current map layers, which can be easily modified to list something else and act on the ...
user avatar
4 votes

Starting ArcMap editing session without displaying Editor toolbar?

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. ...
user avatar
  • 464
4 votes
Accepted

How can I leverage ArcGIS Online sign in credentials/dialog box in a python add-in for Desktop?

You are correct, that box is using OAUTH2. You have no method to force the box to appear from Python. Generally speaking, the app (Map/Catalog, etc) will pop the login box if you aren't connected and ...
user avatar
  • 15.4k
4 votes
Accepted

Limit of Python Add-in for Arcmap?

Personally, I think Python Add-ins are a little complicated for someone who is "still in the beginner phase of understanding and using python". If you are now comfortable writing some Python code in ...
user avatar
  • 63.8k
4 votes
Accepted

Using Python add-in wizard with ArcGIS 10.3 for Desktop?

I was stupid and did not read the instructions correctly. I thought I had a version problem because the documentation was listed for ArcGIS 10.1 and the tutorial images did not match expectations (...
user avatar
4 votes
Accepted

Creating Tkinter dialog box in arcpy?

Since you're using a python addin, you could use the pythonaddins.OpenDialog method. Slightly modified example based on the documentation: This add-in button uses OpenDialog() to select a set of ...
user avatar
  • 52.8k
4 votes
Accepted

Making Python Add-Ins for ArcMap after installing ArcGIS Pro prevents double-click running of makeaddin.py at Python 2.x?

I've figured this out with help from some nudging comments by @ChrisW on this question and an old answer by @MattWilkie. Please only do the following at your own risk because I profess no system ...
user avatar
  • 63.8k
4 votes
Accepted

ArcGIS crashing with Tkinter?

I think the trick to using tkinter in Python is to run it from an external module, that way it isn't competing with the GUI components from the pythonaddins module. I do not take any credit for the ...
user avatar
  • 8,374
4 votes
Accepted

Error Handling within Python AddIns?

You can avoid ERROR 000725: Table Name: Dataset editViewStormBill already exists. by setting arcpy.env.overwriteOutput = True Otherwise you can use arcpy.ExecuteError to catch the exception and arcpy....
user avatar
  • 52.8k
4 votes

How to terminate ArcMap add-in script?

That's cool, I didn't know you could shutdown Arc by calling sys.exit(). The in-program python interpreter shuts down with the exit call and since the ArcGIS is depended on it the action shut downs ...
user avatar
  • 11k

Only top scored, non community-wiki answers of a minimum length are eligible