POST
|
I have written a Python script using wxPython that runs inside ArcMap. It runs fine from the Python Command Line inside ArcMap, but if it is launched from an ArcMap Add-In, it runs once without a problem, but if it is run a second time in the same ArcMap session, it crashes ArcMap. If it is launched from a Toolbar Tool, it crashes ArcMap immediately. More details here: https://community.esri.com/message/769441-is-wxpython-incompatible-with-arcmap-add-ins-and-tools
... View more
05-09-2018
11:35 AM
|
0
|
0
|
1216
|
POST
|
The Add-In for loading Census Bureau TIGER/Line layers that I am currently using was written in VB.NET under ArcGIS 10.0 using Visual Studio 2008. It has a single dialog box with a Combo Box to select the year, a Combo box to select the state within the year, a multiselect scrolling ListBox to select the geography (statewide or county layer), a multiselect scrolling ListBox to select the layer type, a multiselect scrolling ListBox containing the selected layers, a button to add selected layers for the selected year, state, geography(ies), and layer type(s), a button to remove individual layer(s) from the selected layers list, and an Exit button. I do not know of any components in ArcPy or the Python Add-In software that allows the design of a dialog box with 11 interacting GUI controls on it. The Python script that I have written using wxPython works just fine from the Python command line inside ArcMap, and I can run it any number of times. I have to run it inside ArcMap because it is adding layers to an .mxd document, so running it from a Windows Command Line or external Python Command Line will not work. If I try to make a Python ArcMap Add-In that calls the script, it runs once correctly, but the second time I run it in an ArcMap session, it crashes ArcMap. If I try to make a Toolbox Tool that calls the script, it crashes ArcMap immediately. Since my above posts, I have tried running a sample program using PyQT that doesn't even interact with ArcMap in any way, but if I run it from the Python command line inside ArcMap, it runs once without error but crashes ArcMap the second time I run it. For this reason, I don't think that I will bother trying to rewrite the Add-In using PyQT, since it appears to be even more incompatible with ArcMap 10.4 than wxPython is. That's too bad, because I like the QT Designer software which makes it much easier to design a form than writing wxPython code. Currently, the Arkansas Department of Health (where I work) does not have a GIS Coordinator, and I didn't hold that position even when there was one. I really have no control over which ESRI products are currently licensed and available for installation under the agency multi-seat concurrent license, so getting ArcGIS Pro is not an option.
... View more
05-09-2018
10:50 AM
|
0
|
1
|
905
|
POST
|
The agency I work for has a concurrent license for ArcGIS 10.4 not ArcGIS PRO, and I don't have enough clout to push for upgrading to ArcGIS PRO. Is QT more compatible with ArcGIS 10.4 than wxPython? In particular, is QT more compatible with ArcGIS 10.4 Add-Ins and/or Toolbox Tools? I wouldn't like to spend the time converting my current app from wxPython to QT only to find that it has the same problem as the wxPython app.
... View more
05-07-2018
10:30 AM
|
0
|
4
|
905
|
POST
|
I have used wxPython to build a dialog box with GUI controls that runs from the Python command line inside ArcMap, but when I try to connect it to a Toolbox Python Tool, it crashes ArcMap when I try to run it. If I attach it to an ArcMap Python Add-In, it runs exactly once without error. The second time I run it in an ArcMap session, it crashes ArcMap. More details: https://community.esri.com/thread/214273-is-wxpython-incompatible-with-arcmap-add-ins-and-tools
... View more
05-04-2018
12:00 PM
|
0
|
0
|
693
|
POST
|
I have written an Add-In that generates a dialog box that allows the user to select Census Bureau TIGER/Line data layers by description (year, state, state-wide or county layer, layer type) instead of using the standardized file naming convention (which has changed often over the years.) I previously wrote a version of this tool as an ArcMap Add-In in VB.NET using Visual Studio, but unfortunately, each version of ArcGIS is tied to a particular version of Visual Studio. I was able to successfully compile the VB.NET Add-In in Visual Studio 2008 (supported by ArcGIS 10.0). The finished Add-In continues to work in ArcGIS 10.4, but the same source code no longer compiles in Visual Studio 2013 (supported by ArcGIS 10.4), so it is impossible to make any modifications to the Add-In. I decided to try rewriting it in Python, since ESRI is pushing Python as the new development language for customizing ArcGIS. I have written a script in Python that uses the wxPython package to build the dialog box and GUI controls, and it works fine when I run it from the Python command line window inside ArcMap. Unfortunately, when I try to incorporate it into a Toolbox tool, it crashes ArcMap when I try to run it, and when I try to make it into an ArcMap Add-in button, it runs exactly once. The second time I try to run it as an Add-In button, it crashes ArcMap. Is wxPython incompatible with the Toolbox tool and the ArcMap Add-In implementations? I assume that both of these involve putting some kind of wrapper around the Python script
... View more
05-04-2018
11:00 AM
|
0
|
6
|
1604
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|