-
Add-in development in python environment with Arcmap 10.8
Hello I have an add-in project, friends, I did some research, I will write add-in on python for the first time. The problem is that first of all, I found 3 different environments for the working environment. I am currently developing with PyScripter. I am having problems importing arcpy and pythonaddins here, so the addins…
-
Embedding Python Tool in Add-In File
I've successfully created a toolbar using the Esri Add-In wizard. Each button references a different tool from a custom Python script toolbox I've developed. I've made an iteration of the Add-In that references each script tool in the toolbox file, and it works perfect. Now my question: can I embed the script from the…
-
Disable combo box within Commands menu
Is there a way to get rid of the combo box in the Commands menu for a combo box add-in? A good example of what I'm looking for is the Map Scale combo box (shown at bottom). It just has the name of the tool without showing the actual combo box. It also has an icon. Could I add that also? Or no on both?
-
Custom Add-in Tool (Arcpy)
I am trying to make an add-in tool for ArcMap that will allow a user to draw a rectangle to export the visible layers in their MXD to shapefiles. I used the Python Add-in Wizard to create my add-in, and I modified the python script that executes the business logic of my tool like this: <SPAN class="keyword…
-
Created Feature Class temporary by default, need to save the mxd to keep it from being gone...
Anybody have ever ran into something like that& When I run my custom python toolbox, the feature class created in output is not permanent. 1. The toolbox contains a few import from custom modules, classes etc.... 2. The toolbox work perfectly, no error displayed (try, Catch Error etc..) So here's what's happening: - I can…
-
Setup Crowdsource send email tool
I am attempting the setup of the Crowdsource Web App. We also want to utilize the Send Email function for when a Citizen files a report that report gets emailed to the appropriate department. I am struggling understanding how to setup the Python portion of the setup. Can anyone help me figure this portion of the setup?…
-
Building Python Add ins - enable/disable tool when a condition is met?
I am a beginner at Python coding and would require some help with ArcGIS Python Add ins. I have created a TOOL which is working fine. I want to modify my code so this TOOL is enable only when a condition is met (in my case when a single point is selected from a predefined layer). The TOOL become disable when selection…
-
Building Python Add ins TOOL on Rectangle ?
I am a beginner with Python coding and would required assistance with building Python Addin with TOOL class and utilising def onRectangle(self, rectangle_geometry) I have created a toolbar with Python Addin where I have added several button and tools. From the class SetINVISIBLE_TOOL(object): I want to use the def…
-
Python Add-ins TOOL enable/disable on a given condition
I am a beginner at Python coding and would require some help with ArcGIS Python Add ins. I have created a TOOL which is working fine. I want to modify my code so this TOOL is enable only when a condition is met (in my case when a single point is selected from a predefined layer). The TOOL become disable when selection…
-
Building Python Addin TOOLs on Rectangle
I am a beginner with Python coding and would required assistance with building Python Addin with TOOL class and utilising def onRectangle(self, rectangle_geometry) I have created a toolbar with Python Addin where I have added several button and tools. From the class SetINVISIBLE_TOOL(object): I want to use the def…
-
NameError: global name is not defined when Python script is run from ArcMap.
Continuing on in learning Python as I go I am at the next issue. I have created a Python toolbar add-in with a button for use in ArcMap. Start up ArcMap, toolbar is there, select button and a menu I created in Python is displayed. It contains radiobuttons and comboboxes. On the reset button I want to clear the…
-
Cannot exit a Python Script from ArcMap
Thanks for looking at my question. I have a Python toolbar with a button that runs a Python script that displays a menu box. This is being ran through ArcMap. I open my mxd, display the menu, now I want to close it when I am finished and that is the problem. I am calling: def quit(): root.destroy() to close the menu from a…
-
Run Python script from button on toolbar.
Thanks for looking at my question. I learning Python as I go and have made some headway, so here is what I have now ran into. I have a Python script that creates a menu, I can run it from PyScripter and it all works. I have created a toolbar using the Python Add-In Wizard that contains a button that will be used to…
-
Python - Remove quotation marks from combobox.
Thanks for looking at my question. This is my first time working with Python so I am on the learning curve. I am creating a menu and I am populating a combo box from a field in a feature class in a file geodatabase. It works thought the data retrieved needs cleaned up, I have tried a few different way to retrieve the data…
-
Python Add-In Extension 'enabled' / 'autoload' behaviour
I have a Python add-in that includes an extension. The only purpose if this extension is for some buttons in the add-in to be automatically enabled/disabled depending on if there are relevant layers in the current MXD's table on contents. Therefore I need this extension to be loaded automatically when this add-in is…
-
Xlsxwriter package won't install after updating pro to version 2.3
I updated ArcGIS Pro to version 2.3.0 this morning and updated my installed packages in the Python Package Manager. However, after the update I'm missing the xlsxwriter package that I already had installed before the update. I can find it when I search for packages, but the install won't work for me. I've tried a few times…
-
Python Add-in Wizard Not Installing
After I've downloaded and extracted the add-in wizard, I click on the executable and receive the following error: The application was unable to start correctly (0xc0000142) Does anyone have any suggestions? Thanks!
-
Share layers and addins
Hi all, I have a python based add-in working on 10.5. The add-in has many buttons with different functions, where it creates and manages multiple layers. Is there a way to share my map with the add-in functionalities online? like hosting my computer/map with all the layers and tools. I know I can share my layers using…
-
For the python add-in tool button, how to get user input dialogue box to appear on click?
Hi, I am trying to test the python add-in tool to create a custom pop-up dialogue box that allows users enter numerical data that is then run through a mathematical equation script. The result then populates a record in a field from a line that is drawn on the map. I don't know if this needs to be configured in the python…
-
Attribute updating in Python Addins
We have many land class polygons to manually edit. I wish to create a button bar - in Python AddIns - with buttons to allocate the selected polygon (once edited) to the appropriate class (ie update attribute field). There would be buttons for Class 1, Class 2 etc.. so i) edit polygon (eg cut) ii) with polygon selected,…
-
Python Add In for abandoned feature class
Hey everyone! I want to create a Python Add-In tool that will perform the following sequence of tasks: 1. Read a specific feature layer in Table of Content (let's call it X) 2. Check the version for the layer [Working on SDE only] 3. Read the selected features from the layer X 4. Copy the selected features from layer X to…
-
Python Addin extension stops relative paths from working
Hi. I have python code extension that runs on startup. The MXD has "store relative Paths" turned on by default. The script works well and does what it has to do. However every time the script runs it stops the ""Store relative paths" in the MXD from working and breaks the link to the local gdb. The script simply resources…
-
Is there an onUpdate function for the python add-in module so that I can toggle a button state (enable/disable) based on defined parameters, like a feature layer having one selected feature?
I have added a toolbar and a button using python add-in assistant (arcmap 10.4). I would like the button to be enable, if and only if, one particular layer (named operations) has exactly one feature selected. I can easily use the __init__ function of the button to test if these circumstances are met at runtime. If they…
-
Adding ESRI geoprocessing tools to add-in.
Is there a way to add ESRI created tools to an add-in toolbar, so that anyone in the organization could load the add-in and have the tools on it? Or is that beyond the scope of the python add-in? I know how to create a tool palette, for instance, and write python for a custom tool -- but what if I wanted to add the ESRI…
-
How can I get currentLayer Property to work in a Python Add-in
I have written a Python add-in extension for ArcMap 10.6, I want it to automatically update some attributes after a feature is edited or created. My test code looks like this: def onStopOperation(self): print("%d onStopOperation(self)" % self.count) self.count += 1 print("Workspace ", self.editWorkspace) print("Selected ",…