View Full Version : Info: Take care with Shape size and Avoided property

11-17-2011, 02:55 AM

to avoid ferries (please also see post [1]) I added some shapes to my map and set the avoided property. According to [2] there are three GeoAutoShapeType: Radius, Oval and Rectangle. All three are also available when drawing directly in MapPoint GUI.

My first issue is that for a radius there is no sense to state two sizes (width and height), even though description for both parameters states to do so

"The width of the oval or rectangle or the length of the radius" /
"The height of the oval or rectangle or the length of the radius".
What happens when two different values are given?

My second issue is about the Avoided property of the Shape object. According to [3] I can simply set the Avoided property for a shape object. This means that I can use this property for all three kinds of GeoAutoShapeType. Right? When drawing in MapPoint GUI I can set the Avoided property to a rectangle but NOT to a radius or oval. I found out it is described in [3] "Returns or sets whether a route avoids intersections within the specified shape. The AutoShapeType property of the Shape object must be geoShapeRectangle." But VBA code allows setting property and this is confusing, because usually I'm not reading every help for every object, method and property. I would suggest to separate Shape objects with properties that are valid for all types of parameters.

I know, both of my issues are "RTFM"-like, even though I would like people to read Programming Reference carefully and suggest to modify method / object & property definition ...

[1] Avoid ferry thread

[2] Add Shape Method
AddShape method (http://msdn.microsoft.com/en-us/library/gg674805.aspx)

[3] Avoided property for Shape object
Avoided property (http://msdn.microsoft.com/en-us/library/gg662977.aspx)