Type property (Shape)
Returns the data type for the specified Shape object. Read-only GeoShapeType.
GeoShapeType | Value | Description |
---|---|---|
geoAutoShape |
1
|
AutoShape (can be a radius circle, oval, or rectangle) |
geoFreeform |
5
|
Freeform shape (includes drivetime zones) |
geoLine |
9
|
Line |
geoTextBox |
17
|
Text box |
Applies to
Objects: Shape
Syntax
object.Type
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Shape object. |
Remarks
To return whether a shape is a radius circle, oval, or rectangle, use the AutoShapeType property of the Shape object.
Example
Sub GetShapeType()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc(1 To 3) As MapPoint.Location
'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
'Get three locations and zoom in
Set objLoc(1) = objMap.FindResults("Seattle, WA").Item(1)
Set objLoc(2) = objMap.FindResults("Redmond, WA").Item(1)
Set objLoc(3) = objMap.FindResults("Tacoma, WA").Item(1)
Set objMap.Location = objLoc(1)
'Create a polyline and then get the type of the shape
objMap.Shapes.AddPolyline objLoc
MsgBox "The type of this shape is: " _
+ CStr(objMap.Shapes.Item(1).Type)
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.