Add items to Existing Toolbar

365
2
01-23-2012 01:48 AM
KeaganAllan
New Contributor III
Hi,

I have created a custom tool bar using the method described in this tutorial:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Walkthrough_Building_cu...

This works fine for when I have a series of my own tools.
I am having trouble trying to add ESRI tools to my toolbar.
For example, zoom commands, draw commands etc.

Is there a way to do this?
Do I need to edit the XML in VB Express?

Thank you!
0 Kudos
2 Replies
TimWhiteaker
Occasional Contributor
You should be able to use the ProgID to add the ESRI command or tool.  For example, for an ArcGIS 10 add-in, you would edit the toolbar section of Config.esriaddinx to add a Button element mapped to an ESRI tool.  To add the Zoom In Tool, you would add <Button refID="esriArcMapUI.ZoomInTool" />, as shown in the example below:

      <Toolbars>
        <Toolbar id="Microsoft_ArcMapAddin1_My_Toolbar" caption="My Toolbar" showInitially="false">
          <Items>
            <Button refID="Microsoft_ArcMapAddin1_Button1" />
            <Button refID="esriArcMapUI.ZoomInTool" />
          </Items>
        </Toolbar>
      </Toolbars>


After you build the solution, the Zoom In Tool should show up on your toolbar in ArcMap.  The key is to use the right ProgID.  IDs from 9.3 help are listed at
http://resources.esri.com/help/9.3/arcgisdesktop/com/shared/desktop/reference/ArcMapIds.htm
0 Kudos
KeaganAllan
New Contributor III
Hi,

Thank you for your response.
I was trying to do what you said yesterday, but for some reason I have not been successful.

I will keep trying (looking).

Thank you agan,
K
0 Kudos