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
window however.
Note that the Select Features
tool on the Tools
toolbar works fine.
-
Are no layers set to selectable? gis.stackexchange.com/questions/12927/… are you sure your active active data frame has selectable layers? Is the spatial reference set? In previous versions the selection was disabled if the spatial reference of the dataframe was set to unknown.Michael Stimson– Michael Stimson2017年07月27日 23:17:33 +00:00Commented Jul 27, 2017 at 23:17
-
@MichaelStimson That's not it. The Select Features tool on the Tools toolbar works fine.Emil Brundage– Emil Brundage2017年07月27日 23:18:31 +00:00Commented Jul 27, 2017 at 23:18
1 Answer 1
Your problem is that you are adding an item that is not the same as the Select Features
on the Tools
toolbar. The Select Features
from the Data View Context Menu
is the tool that one can start once right-clicking in the data view.
What you are looking for is tools under Selection
category:
Unfortunately, you won't be able to have the same drop-down menu of the tools to pick from (by lasso, polygon, line etc) because this is done by some custom ArcMap UI code that is not exposed through Customize
menu.
The closest you can get is either to have just Select By Rectangle
(which is the default for built-in Select Features
group tool) or to add multiple selection types to the toolbar:
Explore related questions
See similar questions with these tags.