I'm currently using the following code:-
Set objLoc = objMap.SelectedArea.Location
If Not objLoc Is Nothing Then
If Type Of objLoc Is Location Then
Set objShape = objMap.Shapes.AddShape(geoShapeRectangle, objLoc, 5, 5)
objShape.Avoided = True
End If
End If
This has been bugging me... How can I make the area to be avoided be the exact shape I've actually drawn? At the moment, I'm hard coding a distance of 5 x 5 miles. Surely there must be a simple way to use the Selected Areas distance?
Thanks