VB and Lines

Milo
11-17-2004, 10:59 AM
I have placed a series of lines on a map using the addline function. The default color is black, is there anyway to change this? Also I want to be able to clear the map of the lines, is there a method to do this?

Many Regards,
Milo

John Meyer
11-19-2004, 08:43 AM
Here are some samples that might help.

Set objmap = GetObject(,"MapPoint.Application").ActiveMap
Set objShapes = objmap.Shapes
For Each objshape In objShapes
Select Case objshape.Type
Case 9
objshape.Line.ForeColor = vbRed
End select
next

This will delete all shapes.
Set objmap = GetObject(,"MapPoint.Application").ActiveMap
Set objShapes = objmap.Shapes
For Each objshape In objShapes
objshape.delete
next

 
Web mp2kmag.com
mapforums.com