JoeBo
10-31-2007, 04:29 PM
Hi,
How do I loop through pushpins objects to hide any pushpin who’s ballonstate is set show to MapPoint.GeoBalloonState.geoDisplayNone .
Regards,
Joe
diyguypaul
11-01-2007, 06:34 AM
What I did was load a custom symbol that was completely transparent. Then change the symbolid to the new one.
Only problem is custom symbols are very slow
Whitson
11-02-2007, 04:59 AM
Hey Joe,
Here's some Excel VBA to do this
Sub HidePins()
' Attach to already-running instance of MapPoint
Set objMpApp = GetObject(, "MapPoint.Application")
Set ObjMap = objMpApp.ActiveMap
'set this to the name of your pushpins
Set objDataset = ObjMap.DataSets("My Pushpins")
Set objRecordset = objDataset.QueryAllRecords
'hide screen while updating, it's much faster that way
objMpApp.Visible = False
With objRecordset
'move to the first pushpin and then loop through them all
.MoveFirst
Do Until .EOF
With .Pushpin
'.BalloonState = geoDisplayBalloon
'.BalloonState = geoDisplayName
.BalloonState = geoDisplayNone
End With
.MoveNext
Loop
End With
'show the map now
objMpApp.Visible = True
end sub
JoeBo
11-02-2007, 06:06 AM
Hi Whitson
Thanks for the reply, I was able to adapt your code to my requirements, Thank you.
Regards
Joe