mflawton

VB.NET - Set target feature class and select by attributes

Discussion created by mflawton on Apr 18, 2011
Latest reply on Apr 27, 2011 by mflawton
Hello,

I have had difficutly in the past with VB.NET and ArcObjects, it has never quite clicked for me. However, I am bolstered by the new Add-In technology at release 10. It seems like a friendlier way of working with ArcObjects for a non-programmer like me.

But I have hit a stumbling block pretty early on. I am trying to build a very simpel Add-In that will select a voter precinct polygon feature class via user input. I have successfully built the form in Visual Studio and it appears when I test the tool in ArcMap. I am capturing the user input from the text box on the form, but I don't know what the next step is. How do I select a target feature class (the voter precincts) and pass an attribute query?

Here is what I have so far:

Public Class frmPrecinctSearch

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(txtPrecinctSearch.Text) 'for debugging, shows the textbox value is being captured successfully
    End Sub
End Class


If this is too basic of a question then please direct me to the appropriate documentation where I may discover the solution. I seem to be having difficulty with finding ArcObjects documents or instructions that cover this sort of basic functionality.

Thanks!

Outcomes