A python extension to a software program that performs a custom task.

learn more… | top users | synonyms

18
votes
1answer
1k views

ArcGIS 10.1 Python AddIn Using Multiprocessing crashes ArcMap?

I would like to run a multiprocessing task from a python add-in tool. My issue is that the process keeps failing. Basically crashes ArcMap. Here is my basic code: def function(startOID, endOID, ...
11
votes
4answers
1k views

Best method to re-compile a Python Addin after editing script?

I have been developing a few python addins and I'm just wondering what is the best way to re-compile the addin anytime I edit the script. Currently, if I make an edit to the script, it seems like I ...
8
votes
1answer
456 views

How to integrate eclipse (PyDev) with Python Add-In development (ArcGIS 10.1)?

In ArcGIS 10.1, Python Add-Ins make various buttons, toolbars, extensions, etc, available to those already familiar with Python and OO in general. I am in the process of developing a Python Add-In and ...
7
votes
2answers
2k views

Select and copy features in ArcMap using Python add-in tool

I'm trying to add a tool to an add-in toobar to select features from an existing feature class and copy them across to another feature class. I need two tools, one for a point and one for a rectangle. ...
6
votes
2answers
2k views

Getting XY map coordinates on mouse clicks as input variables into a python script

This is my first time coding in python, so bear with me. I wrote a script to calculate an analytical solution to find the orientation of a plane based on three points. I'm using ArcGIS 10.1. # Input ...
6
votes
3answers
808 views

Code to open web browser crashes ArcMap when run from a Python add-in

I created an ArcMap Python add-in using ArcGIS 10.1 to open a webpage after the map is clicked. It opens the page but then ArcGIS crashes. import arcpy import pythonaddins import webbrowser class ...
6
votes
4answers
523 views

accessing the output of a python script tool dialog ArcGIS 10.1

Hi I have a a fairly simple script tool dialog which has been setup to get 6 parameters from the user and return them as the tool output as a list. the aims is that the out put would then be used ...
6
votes
2answers
86 views

How does the deactivate function of an ArcGIS Python Add-in Tool work?

I have not been able to figure out how the deactivate function of a Python Add-in Tool works in ArcGIS. The help page that mentions the function, and that it 'causes the tool to no longer be the ...
6
votes
1answer
189 views

What percentage of ArcGIS users are using version 10.1 already?

I'm planning on building an add-in using ArcPy, but some of the functionality I need is only available in 10.1. I want to distribute this add-in and was wondering if making it 10.1 only would limit ...
5
votes
1answer
108 views

Is it possible publishing a Python Add-in in a web service?

I'm trying to make a multiuser web service for editing an ArcSDE geodatabase. I wanted to know if I can to add my python add-in in Arcgis Server? And if the answer is yes, how can I publish it?
5
votes
1answer
265 views

Arcpy Pythonaddins Equivalent of arcpy.GetParameterAsText

I've build a neat little search arcpy script. The user opens any mxd, zooms to a location, chooses a corporate fGDB, and runs the tool. The user gets a list of all the populated feature class that ...
5
votes
1answer
309 views

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

In ArcObjects, it is possible to retrieve the currently selected editable layer using IEditor3.CurrentTemplate.Layer, or IEditLayers.CurrentLayer. Is it possible to do the same thing in ArcPy? In ...
4
votes
2answers
220 views

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

There is a gap in my understanding of Python Add-Ins. When I create a Python Add-In it is easy to see where buttons, tools and extensions are implemented as Classes in the *_addin.py script of the ...
4
votes
3answers
120 views

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

I have a python addin, which as part of its function checks to see if a template point feature class exists on the user's machine. If it doesn't, it creates this file. This template file is used ...
4
votes
2answers
496 views

Automating a Python expression to calculate acres

I'm not new to GIS but very, very new to using Python and using scripts. I successfully use a Python expression !shape.area@acres! to update a field with acres in a feature class. What my users ...
4
votes
1answer
131 views

Is it possible to store a default symbology layer in an arcpy add-in?

Since arcpy is limited in how symbology can be manipulated, I was curious to know if a symbology layer can be stored in an arcpy add-in. Does anyone know if it is possible to store a .lyr file, or ...
4
votes
1answer
605 views

How do I create a polygon with an ArcGIS 10.1 python addin

I'm looking for some code samples, or help with code to get me started. I've built a python addin menu which I would like to use to create polygon features in a specific layer in my edit session. ...
4
votes
1answer
103 views

Changing value field when applying symbology from layer using Python Add-in?

I have a python addin button that creates a layer file from a polygon feature class in ArcMap. I want to take that layer file and, with user input from a combobox, apply it back to the feature class ...
4
votes
1answer
125 views

Can ArcPy fill forms in Add-in interface?

I'm trying to build an ArcPy tool, which will ask the user to input some information (ID, Name, Address, Zip, etc.) first. My add-in interface is shown below, and hope to implement that once the user ...
4
votes
1answer
192 views

Using onRectangle for user input in ArcMap/ESRI addin

In an effort to try to add user input to my project, I'm developing an esri python addin to generate rectangles to my map. I'm on step one now, just exploring the addin functionality. I tried ...
4
votes
1answer
777 views

Refresh combo box in add-in

I've got an add-in with a combo box and want to refresh the list in the combo box after an event in one of the other tools in the same add-in toolbar. Can I call the combo box somehow to refresh it ...
4
votes
1answer
71 views

Making 'persistent' ArcMap tool without creating Python add-in?

I want to make an addon that, while editing in ArcMap, will track where I pan and move the viewport. I have the pieces together, but I don't like debugging with the Python Add-In wizard, because I ...
3
votes
1answer
759 views

Import functions in python Add-In logic script

I am running into an error. I have a set of functions which I want to import in the python Add-In script at the time of execution, but when I built Add-In with "import stats" line then tools are ...
3
votes
1answer
173 views

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

I'm developing an arcpy addin with ArcMap 10.2 that outputs a feature layer based on user input. How can I display attributes from this layer in a MessageBox or other reporting mechanism? I don't ...
3
votes
2answers
129 views

Should Python Add-In installed in map which is packaged be part of *.mpk?

Using ArcGIS for Desktop 10.1 SP1, I just created a map package (.mpk) from a map (.mxd) which had a Python Add-In (.esriaddin) installed. When I unpacked the .mpk the .esriaddin was neither ...
3
votes
1answer
104 views

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

I have made a python addin button which removes layers that are turned off in an MXD. The strange thing is that I get different results depending on whether I run the python commands in the python ...
3
votes
3answers
455 views

How to create button that calculates acres on selected polygon features?

I'm looking to create a simple button that calculates acres on selected polygons and can't quite find what I'm looking for. I read through this thread: automating a python script..., but found it ...
3
votes
1answer
388 views

How to Select polygon feature in ArcMap and pass Selection into Python Addin?

I have a script that uses a arcpy's 'SelectByAttribute' syntax to choose a record in a polygon feature class. Following that, I do a 'SelectbyLocation' to select points from a feature class that lie ...
3
votes
1answer
89 views

Python objects in my ArcMap addIn aren't instantiated

I've got a weird problem. My addin throws problems intermittently where it doesn't recognize buttons or tools when I try to toggle the visibility in my code. It seems as though the objects aren't ...
3
votes
1answer
250 views

Pythonaddins SaveDialog filter

If you look in the ArcGIS 10.1 help, the Pythonaddins module SaveDialog shows the following: SaveDialog({title}, {name_text}, {starting_location}) But if you open the python window in ArcMap, you ...
3
votes
1answer
41 views

add-in to open automatically "data frame properties

How can created an ArcMap Python add-in using ArcGIS 10.1 to open automatically data frame properties And change the background color of another?
3
votes
1answer
140 views

Using custom shortcut keys in ArcGIS while table of attributes is active window

I have a custom button which is made using python add-in. I add this button in arcgis desktop and assign a new short-cut key for this button. The problem is this button should be used while table of ...
3
votes
2answers
674 views

How to draw rectangle to clip layers using python addin in ArcGIS 10.1?

I want to clip rasters in data view using interactive rectangle (to define Area of Interest) and add them to current dataframe. Following is a piece of code which is not returning anything. Any ...
3
votes
2answers
407 views

How to control state of buttons in Python Add-In?

I have bunch of buttons to perform separate tasks within a Python Add-In. Buttons are greyed out and required to be enabled after initial tools run. In the following example, tool1 is turned off after ...
3
votes
1answer
594 views

Reset python add-in

I have a toolbar which enables a second and third combobox when a selection is made on the previous. I would like to add a button to 'reset' the toolbar. Basically reload the toolbar to it's original ...
3
votes
1answer
162 views

definition query and mosaic dataset from gdb ArcMap 10.1 SP1

I have a Python AddIn Combobox to select a value from the drop-down list. This value changes the definition query of the layers in mxd. This works fine for "normal" feature classes, not for a mosaic ...
3
votes
0answers
66 views

Select and copy attributes features in ArcMap using Python add-in tool?

I'm trying to add a tool to an add-in toolbar to select features from an existing feature class and copy attributes to another feature class,from point to point. TopoHeight_Field_Name='Comment' def ...
2
votes
1answer
97 views

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

How I can do event with two clicks using python add-in wizard, I have found a way to do event with one click by adding a New Tool in the wizard, but I need "first click To copy the attributes from ...
2
votes
2answers
68 views

Python Add-in- Message Box to display area of selected polygons

I am looking to create a Python AddIn which calculates the area of selected polygons. I would like to be able to select the features, click a button on the toolbar, and a Message box displays the sum ...
2
votes
1answer
98 views

How to declare folder name as global?

I have asked similar question at stackoverflow but posting here as well since it involves ArcGIS and python Add-In. Following code shows first step where i have to declare output folder as global so ...
2
votes
2answers
173 views

How to edit Python Add-In and get all changes to work?

I have created an Add-In using Python. However, when I edit the Python script for that Add-In and re-create the '.esriaddin' file, I don't get updated results when using that Add-In. Do I need to ...
2
votes
1answer
125 views

How to start an ArcMap editing session without displaying the Editor toolbar

I'm developing a toolbar with some geoprocessing routines and digitizing functionality. On this toolbar I have implemented a "start edit" button. I want to start an edit session by clicking that ...
2
votes
1answer
81 views

How to reference path to file that is in edit session from Python AddIn?

I am creating a Python addin button and I would like to reference the path to the layer that is currently in an edit session to the code in the addin button. This way users will be able to use the ...
2
votes
1answer
421 views

How to buffer a point in a Python Add-In by ArcMap's selection tolerance?

In this answer to another Python add-in question I suggested supplying a search_distance to the SelectLayerByLocation function in order to allow points and lines to be selected by an intersecting ...
2
votes
1answer
93 views

Opening PDF generated by Python AddIn using Report (*.rlf) file automatcally?

As a test I have: Authored a test.mxd with one layer called Localities in a single data frame called Layers Authored a test.rlf using View | Reports > Create Report of ArcGIS 10.2.2 for Desktop ...
2
votes
1answer
292 views

Python add-in won't buffer from output layer

I have a simple add-in script for Arcmap 10.1 to create a toolbar, select a layer from a drop down list of the current layers in the project, buffer that layer four-miles, then use the resulting ...
2
votes
1answer
158 views

ArcPy Clip Data Frame To Geometry

I have made an ArcPy add-in that assists a user by adding layers from a nominated fGDB to their map based on a nominated extent. I wish to add a button that changes the data frame properties to clip ...
2
votes
1answer
68 views

Why does Fetch Python Plugins responded with only the installed ones?

I use QGIS 1.8. Whenever I demand to install plugins through Fetch Python Plugins it displays only those the already installed. I couldn't find for example; point sampling, group stats and photo2shape ...
2
votes
2answers
424 views

Run Python child script using Python Add-In button class?

I have a Python script which I want to execute using Python Add-In button class. Right now, I am using following: class child(object): """Implementation for Toolbar_addin.button2 (Button)""" ...
2
votes
1answer
242 views

Calculate Field using Esri Python Addin

I am trying to select a polygon then it must automatically change (calculate) the status to "C". The tool seems to work in the background but nothing actually happens (the status is not updated). I ...