MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Reading Territories name Programmatically using VB

This is a discussion on Reading Territories name Programmatically using VB within the MapPoint 2006/2009 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). ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 05-16-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 05-20-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
programmatically, reading, territories


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Reading Data Stream DataRadio and MapPoint LDH MapPoint 2006/2009 Discussion 2 01-19-2006 03:20 PM
Creating Territories programmatically Atul22 MapPoint 2006/2009 Discussion 3 10-05-2004 11:15 AM
Programmatically creating Territories? jlaretto MapPoint 2006/2009 Discussion 1 01-29-2004 03:01 AM
reading each pinpoint with a selected area of the map Anonymous MapPoint 2006/2009 Discussion 1 10-18-2003 06:28 PM
Showing ZIP code divisions for territories programmatically Fer MapPoint 2006/2009 Discussion 1 09-10-2003 07:51 PM


All times are GMT -5. The time now is 10:16 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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