View Single Post

  #2 (permalink)  
Old 01-12-2005
Winwaed's Avatar
Winwaed Winwaed is offline
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 892
Blog Entries: 9
Yes, they're stored as "pushpin sets". You can have multiple pushpinsets, but you have probably added your pushpins to the default "My Pushpins".
This in turn is a "Recordset". If you look up "Recordset" in the help it will show you how to access them.

Eg. to get the names of the pushpins in VB6, I have the following code:
Code:
' pushpinset,  dsidx is an index that is passed in
' you could query oMap.DataSets until you find the required pushpinset
Dim oDS As MapPoint.DataSets
Set oDS = oMap.DataSets
Dim thisDS As MapPoint.DataSet
Set thisDS = oDS.Item(dsidx)
        
' loop over each pushpin, saving the name
        
Dim oRS As MapPoint.Recordset
Set oRS = thisDS.QueryAllRecords()
        
Dim n As Long
n = thisDS.RecordCount
        
ReDim SrcNameArray(n) As String
        
oRS.MoveFirst
Dim ii As Integer
ii = 0
Do While Not oRS.EOF
         ii = ii + 1
         Set pp = oRS.Pushpin
         SrcNameArray(ii) = pp.Name
         oRS.MoveNext
Loop

The above is an extra of a program I have - I've taken out some extra code to keep things simple and easier to understand what is happening.
Combined with the help that comes with MapPoint, it should get you going!


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Reply With Quote