|
POST
|
The correct syntax for MessageBox is – I mistakenly left out ‘title’ ☹ MessageBox(message, title, )
... View more
09-19-2016
08:50 AM
|
0
|
0
|
992
|
|
POST
|
@Luke Webb, In your code add an "if" block to see if there is any selection - if yes then put your "takes the tools rectangle_geometry, does a load of clever stuff, then clears the selection as work is complete" code there. In the "else" block you can print a statement or pop-up a message window or do nothing - going ahead to use ArcMap's select tool to make a new selection and use the tool again. Your code may look like: def onRectangle( .................):
dsc = arcpy.Describe("layer_name")
selection_set = dsc.FIDSet # returns a list of selected feaures' IDs
if selection_set: # that means at least one feature is in selection set
# do your stuff ...
# ....
else: # no feature is selected
# pop up a message dialog asking user to select some feature to use the tool
pythonaddins.MessageBox("Please select some features to use the tool", 0)
# or ... just skip this part
pass
Note: the above code is typed in the browsed - there might be syntax error
... View more
09-16-2016
09:01 AM
|
0
|
2
|
992
|
|
POST
|
No, I haven’t ☹ I have just sent you a message – let me know if you received it. You can email me at nahmed@esri.com
... View more
09-07-2016
08:33 AM
|
0
|
0
|
708
|
|
POST
|
Can you message me the config file (located where the makeaddin.py file is)? There might be some name conflict.
... View more
09-01-2016
10:09 AM
|
0
|
2
|
1570
|
|
POST
|
If you haven’t browsed this topic yet ☺ http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/managing-the-state-of-add-in-types.htm#GUID-F8454EED-0371-49E9-BFC7-D820B00C62C4
... View more
08-31-2016
02:23 PM
|
0
|
4
|
1570
|
|
POST
|
Greg – I understand your problem. Right now I don’t see any other way to “deactivate”. The deactivate method in Tool class is only triggered when the tool is disabled. I’m end of my ideas ☹ Please share with us if you find a good way to achieve your goal.
... View more
08-31-2016
01:44 PM
|
0
|
1
|
1570
|
|
POST
|
Here is an idea – just tried and it works for me. In any of the methods of the Tool class, such as OnDblClick, write this line of code: self.enabled = False So, whenever you want to deactivate the tool, just double-click anywhere on the map. I’m still trying to figure out how can I activate it back. If you have any other button or tool you can use one of those methods to enable it to True. I’ll get back once I get a solution.
... View more
08-31-2016
12:35 PM
|
0
|
3
|
1570
|
|
POST
|
Just to be precise – you are using a Tool Class, right? You want to deactivate it “as soon a user has completed its task” – is there is any mechanism the tool can be aware of when the task is done? It has to happen before the Tkinter dialogs are launched – how do you launch the Tkinter dialog? By clicking on another button or tool?
... View more
08-31-2016
09:57 AM
|
0
|
5
|
1820
|
|
POST
|
I'm afraid you cannot deactivate programmatically What do you want to achieve by deactivating the add-in? Not to be able to use it in the same session? or next time you open ArcMap?
... View more
08-31-2016
09:20 AM
|
0
|
9
|
1820
|
|
POST
|
Hi Charlene, Download the content from this link - it contains some supplemental tools along with documentation on how to use them along with the system tools found in conflation toolset. http://www.arcgis.com/home/item.html?id=36961cde1b074f1f944758f6abec87cc
... View more
04-12-2016
04:14 PM
|
1
|
1
|
1458
|
|
POST
|
You are right about Esri's samples - one can easily get lost Other aspect is Esri's samples use Dojo toolkit whereas most other (non-esri) samples use jQuery.
... View more
02-19-2016
12:47 PM
|
0
|
0
|
1118
|
|
POST
|
General HTML and JavaScript: W3Schools Online Web Tutorials and specific ArcGIS online: Concepts Overview | Guide | ArcGIS API for JavaScript You don't need to learn a whole lot of JavaScript to get going with Esri's online stuff. There are tons of samples and example codes on ArcGIS API link. Use the sandbox in both links.
... View more
02-19-2016
09:41 AM
|
1
|
2
|
1118
|
|
POST
|
If you know the WKID - just the number then it's easy to create one. # 32145 is the code for: # NAD 1983 StatePlane Vermont FIPS 4400 (Meters) sr = arcpy.SpatialReference(32145) You can now use this sr object in ArcGIS, for example as: arcpy.Project_management(r'D:\data\fc.shp', r'D:\data\fc_project', sr) You can get the WKID from EPSG directory https://www.epsg-registry.org/
... View more
12-03-2015
01:18 PM
|
0
|
1
|
2026
|
|
POST
|
Hi Joseph, you can call Convert Coordinate Notation gp tool (in Data Management > Projections) in .Net - check out ArcGIS.Desktop.Core.Geoprocessing documentation to see how to run a geoprocessing tool in .Net using ExecuteToolAsync method.
... View more
10-08-2015
10:41 AM
|
0
|
0
|
908
|
|
POST
|
@William McLay, Download the ZoomToFeature Python add-in from here: http://www.arcgis.com/home/item.html?id=e753f3287f4a46c98c60e3e5c6a21463 Unzip the download - you'll see a folder named Install - there is a word document inside that folder. The doc describes how to use the add-in.
... View more
10-06-2015
02:23 PM
|
1
|
0
|
1845
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-18-2019 03:56 PM | |
| 1 | 05-06-2020 01:18 PM | |
| 1 | 07-23-2021 10:33 AM | |
| 1 | 07-28-2020 09:10 AM | |
| 2 | 07-27-2020 04:47 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-25-2021
03:13 PM
|