Select to view content in your preferred language

Adding Custom tools to an add-in toolbar

1349
4
01-13-2011 07:46 PM
JessieParteno
New Contributor
Hi,

I have created multiple custom tools in VS 2008 and I want to add them to an add-in toolbar but i can't get it to work. When I create the toolbar I tried to add the Guid of the custom tools but they are not showing up in the toolbar when I add it to ArcMap. How do you add multiple custom tools to a custom toolbar?

Thanks,

Jessie
0 Kudos
4 Replies
JeffreyHamblin
Occasional Contributor
Are you using the new "Add-in component" wizard to add the toolbar, and then using the "Items" on the wizard dialog to add the buttons? That process should update your Config.esriaddinx file.

I suggest you post the contents of your Config.esriaddinx file here.

-Jeff
0 Kudos
RuchiraWelikala
Regular Contributor
Hi,

I have created multiple custom tools in VS 2008 and I want to add them to an add-in toolbar but i can't get it to work. When I create the toolbar I tried to add the Guid of the custom tools but they are not showing up in the toolbar when I add it to ArcMap. How do you add multiple custom tools to a custom toolbar?

Thanks,

Jessie


Could we see the you're using to implement the GUIDs and which GUID are you using? (there are 3)
0 Kudos
RuchiraWelikala
Regular Contributor
Try out this thread... I asked this same question last year and someone helped me out.
http://forums.arcgis.com/threads/4951-custom-toolbar-vb.net

Best of luck.
0 Kudos
JohnHauck
Frequent Contributor
First off, can you find your commands in the customize dialog (did they register correctly)? If not you may need to take another look at the tools or commands. Did you register with ESRIRegAsm? Secondly, use the ProgId rather than the GUID.

Your solutions config file may look like this:

<ArcMap>
      <Commands>
        <Button id="ArcMapAddin1_Button1" class="Button1" message="Add-in command generated by Visual Studio project wizard." caption="My Button" tip="Add-in command tooltip." category="Add-In Controls" image="Images\Button1.png" />
      </Commands>
      <Toolbars>
        <Toolbar id="myID" caption="caption" showInitially="true">
          <Items>
            <Button refID="ArcMapAddin1_Button1"/>
            <Button refID="ArcMapClassLibrary1.TestBaseCommand"/>
          </Items>
        </Toolbar>
      </Toolbars>
    </ArcMap>
0 Kudos