Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a code that selects row data from a listview table in I have declared that data as a variable and I can see it if I ask it to dispay a message box (see code below).

Now I would like to take that data and place it into either an existing or new shapefile using ArcObjects but I am unclear on the process.

Any hints or ideas would be helpful.

Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged

    'met en mémoire l'item selectionné
    Dim i As Integer

    If ListView1.SelectedItems.Count = 0 Then
        Exit Sub
    End If
    'Met en mémoire les sous items de l'item séléctionné
    Dim x As String = ""
    Dim y As String = ""
    Dim z As String = ""

    'séléction de l'index de l'item
    i = Val(ListView1.SelectedIndices.Item(0).ToString)
    ' spécifie de prendre toute la rangée sélctionné
    ListView1.FullRowSelect = True
    ' Set the view to show details.
    ListView1.View = View.Details

    'Fait en sorte d'extraire les sous items 1, 2, et 3 (les 3 rangée "message, GeoLat, GeoLong"
    x = (ListView1.Items(i).SubItems(1).Text)
    y = (ListView1.Items(i).SubItems(2).Text)
    z = (ListView1.Items(i).SubItems(3).Text)

    'Concatenation des trois sous items en une ligne.
    Dim a As String = ""
    a = i & " " & x & " " & y & " " & z

    MsgBox(Err.Number & "  " & Err.Description)
    'Pour verifier si la routine fonctionne...

End Sub
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.