Share via


Weight property

Returns or sets the thickness of the line or border of the shape to which the line formatting applies, in pixels. Read/write Long.

Applies to

Objects:  LineFormat

Syntax

object.Weight

Parameters

Part Description
object Required. An expression that returns a LineFormat object.

Example

    Sub ThickenLine()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc1 As MapPoint.Location   Dim objLoc2 As MapPoint.Location
  'Set up the application   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True
  'Get two locations and zoom in   Set objLoc1 = objMap.FindResults("Seattle, WA").Item(1)   Set objLoc2 = objMap.FindResults("Redmond, WA").Item(1)   Set objMap.Location = objLoc1
  'Create a line, then thicken the line   objMap.Shapes.AddLine objLoc1, objLoc2   objMap.Shapes.Item(1).Line.Weight = 14
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.