Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Reading Territories name Programmatically using VB

This is a discussion on Reading Territories name Programmatically using VB within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi , I have map open using activex control. Map has some Territories name created manually( no linking or import). ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Reading Territories name Programmatically using VB

    Hi ,

    I have map open using activex control. Map has some Territories name created manually( no linking or import). I would like to retreived the Territories name as string.

    This is possible if you import Map from excel file and i can read all records

    Set mpDataSet = .ImportTerritories(szconn, , geoCountryUnitedStates, , geoImportExcelA1)

    Set objRecordset = mpDataSet.QueryAllRecords
    This way i can navigate to all record and get the Territories names.

    BUT i don't see any object in MapPoint 2002 which allows me to read the same info from manually created Territories .

    Any idea please.

    Thanx in advance.

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Re:Reading Territories name Programmatically using VB

    I guest MapPoint does not provide enough of information on Territories.

    Does any body know more about object required to read the Territories content of .ptm file

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Reading Territory info using VB control

    Here is the code to read the linked Territory. I was wondering if some body has dome the same but with Manually created Territory

    With objMap.DataSets
    szconn = objMap.Path & "C:\MapPoint\pushpin\Terrs.xls!Sheet1!A1:E127"
    Set mpDataSet = .ImportTerritories(szconn, , geoCountryUnitedStates, , geoImportExcelA1)
    End With

    Dim objRecordset As Recordset
    Set objRecordset = mpDataSet.QueryAllRecords
    Dim strLookUp As String
    ReDim Preserve strRegion(0)
    x = 0
    'Get the values
    Dim vals As String
    objRecordset.MoveFirst
    Dim i As Integer
    Do Until objRecordset.EOF
    strLookUp = Trim(objRecordset.fields("Territory"))
    ReDim Preserve strRegion(x)
    strRegion(x) = strLookUp // I have the list here...
    x = x + 1
    End If
    objRecordset.MoveNext

    Loop

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Reading Data Stream DataRadio and MapPoint
    By LDH in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-19-2006, 02:20 PM
  2. Creating Territories programmatically
    By Atul22 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-05-2004, 10:15 AM
  3. Programmatically creating Territories?
    By jlaretto in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-29-2004, 02:01 AM
  4. reading each pinpoint with a selected area of the map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-18-2003, 05:28 PM
  5. Showing ZIP code divisions for territories programmatically
    By Fer in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-10-2003, 06:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83