Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [python-addin]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
41 views

Select Features grayed out in PythonAddins toolbar

I've created a custom toolbar using the pythonaddins module. For ease of use I'd like to add the Select Features tool to the toolbar. The tool becomes grayed out as soon as I close the Customize ...
0
votes
1answer
258 views

Opening script in Toolset using GPToolDialog()?

I need to open a Python Script using GPToolDialog(), but the script is in a Toolset, not in the Toolbox main path. I tried many ways to solve but do not work, examples: Example 1: pythonaddins....
0
votes
2answers
57 views

Get text from user with pythonaddin

I'm trying to figure out the best way to get text input from a user through a pythonaddin. After watching this video it appears that a editable combo box is an option, but it's maybe not ideal due to ...
0
votes
0answers
22 views

pythonaddins interactive output registry to a shapefile recursively

I am using pythonaddin's onMouseDownMap to get flow paths interactively and add each line drawn to a shapefile. "line" shapefile is created each time using arcpy.RasterToPolyline_conversion whenever I ...
0
votes
1answer
241 views

Open Python Script with pythonaddins.GPToolDialog from Addin Wizard

I created a addin from python addin wizard with many menus and buttons. For one of these buttons I want to open a Python (.py) script from my Toolbox. I tried many ways but no one works. I want this ...
4
votes
0answers
131 views

Check for mxd write access with python addin

I'm looking for a way to check for write access to an mxd upon the initiation of a python addin tool. My tool should only be enabled if the user has write access to the mxd. I thought there was a way ...
0
votes
1answer
37 views

Set Scale Button Doesn't Work

I'm trying to create a button that sets the map scale to 24000. I'm working in ArcMap 10.1 and my Python programming skill is rudimentary. I followed the Python Add-In instructions and the creation ...
1
vote
1answer
64 views

Python Addin only works if Python Window open in ArcMap?

Using ArcGIS 10.2.1 and Python 2.7 My python addin works in ArcMap if I open ArcMap with the Python window open, but if I open ArcMap without the Python window open - I get a "MISSING" tool error. ...
1
vote
0answers
386 views

Pythonaddins Message Box encoding problem

I've been trying to create a MessageBox with accented characters. To do so, I used the decode() and encode() functions. The code is part of a Python Toolbox. pythonaddins.MessageBox("ééàà".decode('...
-1
votes
1answer
489 views

Getting Index of Selected Combobox in ArcGIS Python addin

Using ArcGIS Python addin I need to get the Index of selected item from Combobox on change I already tried def onSelChange(self, text): global selectedIndex selectedIndex = ...
3
votes
1answer
77 views

Displaying Image for built-in command added to Python Addin toobar?

I'm trying to create a Custom Python Addin for ArcMap, which contains a custom tool, and also needs to have the standard 'Save As' button. After referring to https://blogs.esri.com/esri/arcgis/2012/...
1
vote
1answer
180 views

Python AddIns Installation Tool Not Showing After Double Clicking on makeaddin.py

I am using Python Add-In Wizard with ArcGIS 10.4.1 but after getting the files I am not able to create installation Wizard! I tried to create the wizard by double clicking on the looks like ...
0
votes
1answer
62 views

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

As a follow-on to the answer provided by blah238 to this question. So I'm working in maps with units of meters, and I convert 96 DPI as follows, but I don't seem to be able to click on anything when ...
2
votes
1answer
99 views

Building Python add-in button to calculate elevation change

I'm building a python add in button that calculates elevation change. I want the user to be able to click the button, click one cell on a DEM, click another cell, and then display a message that has ...
1
vote
1answer
290 views

ESRI Add-In is [ MISSING ]

I am trying to create a functional add-in button that calculates the areas of a selected shapefile. The code is located below. However, when I create the add-in and bring up the toolbar, I can only ...
3
votes
0answers
30 views

Python Add In Change tab in Table of Contents [duplicate]

I'm working on an add in that generates new structures for an addressing system. The tool is working well, but as it runs, at some point it changes tabs in the Table of Contents to the "List By Source"...
1
vote
1answer
83 views

Tool in Tool Palette as a parameter for Button

I built a simple toolbar with Tool Palette and Button. Button should make a selection according to a global parameter which can be set by selection of Value in Palette box. I.e. if I choose number "1"...
0
votes
1answer
200 views

Error Handling within Python AddIns?

I'm working on some code for a toolbar I made using Python-addin that makes buildings. Part of the code that does this makes a Temporary table view. If my code attempts to make that table view again ...
1
vote
0answers
86 views

InsertCursor on a event table (linked to linear referencing) not displayed directly on the map [closed]

I have a Python script (Python add-in) that creates new entries (with InsertCursor) in an event table that was used for linear referencing (through Display Route Events). The table is stored in a file ...
0
votes
1answer
536 views

Combo box string as input for a button

I built a python addin for Arcmap and I need to print a folder path to a combo box, which should be a destination folder to copy my *.gdb file. After a click on a "Backup" button this tool should ...
2
votes
0answers
92 views

Creating Routes in File Geodatabase gives ERROR 000732? [closed]

UPDATE: I solved this issue by circumventing it - I moved to using the "in_memory" work space which also has improved the speed of my tool. The only change I had to make was to manually calculate the "...
1
vote
1answer
641 views

Add-In Combo Box: populate with specific field's values and pass selection to select by attribute

I checked Passing Selection from Combo Box into Definition Query using Python AddIn?, but I am still stuck on code/syntax. I created a simple add-in with a button that clips and exports tax parcels ...
1
vote
0answers
147 views

Managing the state of Python Add-In extension

I have a python add-in that includes a toolbar and an extension. A button on the toolbar should turn extension on and off. A code for the button: class Switch(object): # Implementation for ...
0
votes
1answer
94 views

Tool in Toolbar is not visible in Customise Commans tab [closed]

I have added a tool in a toolbar in python addin wizard. And while opening arcmap I am getting the error :--- c:\arcgis\ArcToolbox\Toolboxes\Space Time Pattern Mining Tools.pyt ^ SyntaxError:...
-1
votes
1answer
52 views

Unable to add toolbar in Python addin wizard

I am trying to create a customized tool in an ArcPy script. For that I want to add a tool in a toolbar in the Python addin wizard. I have downloaded the Python addin wizard and am trying to add a ...
3
votes
0answers
324 views

ArcGIS pythonaddins.ProgressDialog inconsistent progress bar drawing

I am trying to use pythonaddins.ProgressDialog in a Python add-in. I am on ArcGIS 10.4. I will need to perform several steps that will take some time. To show how much work is done, I plan to use a ...
2
votes
2answers
471 views

Arcpy deselect layer in TOC

With python-addin-wizard I created a combobox which enables the user to select a specific ID of features in multiple featureclasses of the Table Of Content and then it zooms to the selected feature. ...
1
vote
2answers
110 views

Problem with layer name

I need to write a code to read a polygon shapefile that contain three classes of land use (trees, urban, and crops) and I need to select only polygons of Trees. Here is my code to apply Select by ...
1
vote
1answer
305 views

unable to change the work space using arcpy

I try to create a folder and Geodatabase at the beginning of my code, so all results will be saved in it. My code is: class btn_WF(object): """Implementation for Addins_addin.button (Button)""...
1
vote
1answer
258 views

Filter of pythonaddins.OpenDialog window

I need to make a pythonaddins.OpenDialog to select a "Folder location" What is the filternto written in this statement Folder_Location = pythonaddins.OpenDialog("Please select a folder to store the ...
0
votes
1answer
70 views

Turning first vertex of a line into a point

import arcpy import math import pythonaddins class Line(object): """Implementation for Projects_addin.Project1_2 (Tool)""" def __init__(self): self.enabled = True self.cursor = 3 self....
0
votes
2answers
863 views

ArcGIS crashing with Tkinter? [closed]

When I run certain scripts (contains tkinter or similar python packages) ArcGIS crashes. When I load or copy/paste the same code and run it in a Python window it runs without error. Is there a ...
1
vote
1answer
603 views

Display a messageBox with an image in ArcMap

I wanted to add "ABOUT" button to a Pythonaddins toolbar the button should display a window that contains both of a text defines the authors and an image about the developer organisation. I followed ...
2
votes
1answer
838 views

Where to download python add-ins?

I'm new in Python programming If there are websites where developers can share their add-ins and scripts that will be great. do you know any? unfortunately, arcgis.com only provide very few
0
votes
1answer
232 views

pythonaddins.OpenDialog doesn't work properly

I am developing a toolbar by the pythonaddins, in regards to define all the input raster files. I wrote the follwoing lines so the user enters how many data he wants to read and accordingly, an input ...
3
votes
4answers
2k views

Getting layer name of selected features with ArcPy?

I'm working on Python add-in that changes geometry of an object (polygon orthogonalization). The tool itself works properly when I give it an input line of layer name (or just drag layer from table of ...
1
vote
1answer
449 views

Refreshing Python AddIn combobox => TypeError: unbound method refresh() must be called with <class> instance as first argument (got nothing instead)?

I have created a minimalist test Python AddIn using ArcGIS 10.4.1 for Desktop, with a toolbar and two comboboxes on it. The code (TestAddIn_addin.py and config.xml) appears at the bottom of this ...
2
votes
1answer
159 views

Add a tool to dropdown menu with the Python Add-In Wizard

Is it possible to add a tool created with the Python Add-In wizard to a menu in a toolbar that is also created with the add-in wizard? I haven't had much luck in trying to figure this out. I've ...
1
vote
1answer
313 views

Displaying graph plots with mouse click on map in ArcGIS for Desktop?

I need to build a tool/add-in for ArcGIS 10 which will display a time distribution plot at the location where mouse is clicked. The TOC consists of results of a simulation at different time instants. ...
1
vote
1answer
109 views

Python Add-In will not run

I am using ArcMap 10.4. I’ve been trying to implement a python add-in that runs when Arcmap is opened. When the script does run it joins a layer with a feature service layer. I have everything ...
1
vote
1answer
65 views

Importing Functionality from Python Addin into script

I am not sure if what I am trying to do is possible without using Arcobjects, but what I want to do is use a piece of a prebuilt addin created by ESRI and then add it into my own Arcpy script. The ...
2
votes
1answer
477 views

Alternative to self.Destroy() for wxPython in Arcmap?

I have created a Python Add-in for ArcMap 10.4 that involves a wxPython UI to display upon a click on a map. The UI is populated with default values as well as a combobox displaying the layers on the ...
1
vote
2answers
214 views

Python Add-in using arcpy.mapping.ListLayers() does not update when run multiple times

I am developing a Python Add-in for ArcMap 10.4 that, upon a click on a map, opens a wxPython GUI that contains a combo box listing the layers in the map document. Here's a current snippit from my ...
1
vote
1answer
481 views

Pass the onMouseDownMap X, Y from a python addin to a toolbox script tool

Is it possible to pass the onMouseDownMap X, Y coordinates to a script tool launched using GPToolDialog? The end goal is to have the user select the add-in tool, click the map to add a point, then ...
1
vote
1answer
722 views

Dynamically editing items in combobox of Python AddIn?

I'm trying to dynamically edit the list of items in a combobox I made using python add in for a toolbar I'm working on. The list is calculated by another button. Here is the relevant code: class ...
0
votes
4answers
323 views

Setting selection method in ArcPy?

I haven't found a way of setting the selection method (Create new, Add to current, Remove from current, Select from current selection) in arcpy. Is it possible to do this and - if yes - how? I am ...
3
votes
1answer
87 views

AddRaster using pyqgis

I am able to attach a raster by using python console using the command shown below. qgis.utils.iface.addRasterLayer('D:/Work/dt0017810q.tif') But, when the same image/raster path is read from a ...
0
votes
1answer
2k views

How so I solve FDO error: 0? How do I get code that worked in a file geodatabase to work in an SDE version?

I used python add in to make a tool bar in Arcmap that edits features on a map. It works on a file geodatabase, but not on an ArcSDE version one. I've been getting an FDO error: 0. The potential ...
1
vote
3answers
2k views

Why can't I open this workspace?

I used python add in to make a tool bar in Arcmap that edits features on a map. It works on a file geodatabase, but not on an ArcSDE version one. I've been getting an FDO error: 0. The solutions that ...
4
votes
1answer
462 views

Clear combo box in ArcMap Python Add-in

Recently created my first Python Add-In for ArcMap. It has been deployed for about a month now and the users like it. There is one thing I want to fix. The Add-in has two combo boxes: In #1 the ...