Height property (Shape)
Returns or sets the height of the shape, in points for text box shapes and in GeoUnits (miles or kilometers) for oval, radius, and rectangle shapes. Returns an error for lines and freeform shapes. Read/write Double.
Applies to
Objects: Shape
Syntax
object.Height
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Shape object. |
Remarks
To return or set GeoUnits, use the Units property of an Application or MappointControl object.
Example
Sub ShapeHeight()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc As MapPoint.Location
'Set up application and get a location object
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
Set objLoc = objApp.ActiveMap.GetLocation(0, 0)
'Create a shape at this location, then zoom to this location
Set objMap.Location = objLoc
objMap.Shapes.AddShape geoShapeRectangle, objLoc, 30, 40
'Get the height of the shape you created
MsgBox "Height of the shape is: " _
+ CStr(objMap.Shapes.Item(1).Height)
End Sub