Select to view content in your preferred language

Accessing Addin button outside current addin project

3222
5
09-29-2010 05:20 AM
ChrisSchmeissner
Emerging Contributor
I have written a simple addin in vb.net in ArcGIS10 which displays a simple windows form with various button. On this form I would like to place a button, that when clicked will preform an action which is already a button or tool of another addin. How do I access a button or tool addin outside of the of its existing project. I have played around with the AddIn.FormID Method but have had no success.
Thanks for your help.
0 Kudos
5 Replies
AZendel
Frequent Contributor
Did you ever find out how to do this?  We have a command/button that is used by many people in our office and we would like to be able to call it from an extension add-in. 

Thanks,

Alex
0 Kudos
ChrisSchmeissner
Emerging Contributor
Not yet. Still hoping for some help.
0 Kudos
MattCrowley
Emerging Contributor
Did you ever find a solution to your problem.  I am just getting started with Addins and I have a combobox and a button which opens a form.  On that windows form I want to be able to change the items in the combobox.  I to have struggled with FromID.
0 Kudos
MattCrowley
Emerging Contributor
I think I just figured out my problem.  I am just replying in case it helps others in the future.

In my case I have an addin which so far contains a toolbar which contains a button and a combobox.  when the button is pressed it opens a windows form which has some search tools.  These search tools help find a unique schedule number.  What I wanted to do was have the OK button on the windows form add the schedule number to the combobox and "select" it.  Anyway, here is my code for that Ok button.
Private Sub cmdOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdOK.Click
        Dim cmb = ESRI.ArcGIS.Desktop.AddIns.AddIn.FromID(Of SchedNumComboBox)(My.IDs.SchedNumComboBox)
        cmb.UpdateBox(txtSchednum.Text) 
        Me.Close()
    End Sub
0 Kudos
TereseRowekamp
Deactivated User
Thanks for posting your solution, Matt. I find these forums very difficult to search and find solutions, but after digging a while I came across your posting. I was trying to figure out how to access a combobox from a button in the same addin, and your answer got me there.
0 Kudos