Select to view content in your preferred language

Add-in layer popup content

842
1
08-07-2013 08:10 AM
anthonylecour
New Contributor
in VB, is it possible to get back a feature layer attribute value wich appear in a layer popup content ?

thanks for your help

anthony
0 Kudos
1 Reply
anthonylecour
New Contributor
I find a bypass solution in creating a point which intercept my layer and return the feature attributes values in a rowcollection.


here is the code :

        'requete pour afficher les enregistrements issus d'un intersection avec un point ou un polygone
        Dim layer As FeatureLayer = TryCast(ESRI.ArcGISExplorer.Application.Application.SelectedItems(0), FeatureLayer)

        ' allow the user to digitize a point on the map
        Dim point1 As ESRI.ArcGISExplorer.Geometry.Point = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.TrackPoint()
        Try

            ' query the feature layer for the features that intersect the point
            Dim rowCollection As RowCollection = layer.Table.Search(New Filter(point1, FilterSearchOptions.Intersects))
            Dim elt As Row = rowCollection.ElementAt(0)
            Dim numprop As String = elt.Values(10)
            MsgBox(numprop)

        Catch ex As NullReferenceException
            System.Windows.Forms.MessageBox.Show("No features were selected. Please try again.")
        End Try
0 Kudos