i am wondering about the polyline function.
My questions are:
1) why does ProcessBook create 5 points by default when a polyline is created?
2) how does one remove/create points of a polyline?
the .count parameter seems to be a read only parameter
below is my attempt.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CreatePolyline()
Dim iPolyline As Polyline
Dim j As Integer
j = 1
Set iPolyline = ThisDisplay.Symbols.Add(pbSymbolPolyline)
With iPolyline
.EnableScript = True
.Name = "Polyline" & j
.Left = -14849
.Top = 14328
.BackgroundColor = -1
'.Endpoints.Count = 1
.Endpoints.item(1).X = -14800
.Endpoints.item(2).X = -14800
.Endpoints.item(3).X = -14800
.Endpoints.item(4).X = -14800
.Endpoints.item(5).X = -14800
'.Endpoints.Insert(item(6), -2, 2).X
'.Endpoints.remove (.Endpoints.item(5))
'.Endpoints.remove (iPolyline.Endpoints.item(5))
'.Endpoints.remove (.Endpoints.item(5).X)
'.Endpoints.remove (.Endpoints.item(5))
End With
End Sub
'"vba watch" was used in conjunction with the following code to sort of figure out stuff
'break was placed at msgbox statement while stepping through
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub whatIsIt()
Dim mine As Polyline
Dim b 'As Variant
Dim d
Set mine = Me.Polyline1
Set d = Me.Polyline1.Endpoints
'Set b = Me.Polyline1.Endpoints.item(1).X
'Set b = Me.Polyline1.Endpoints.Item(1).Application
'Set d = Me.Polyline1.Endpoints.Item(1).Parent.Item(1)
'MsgBox Me.Polyline1.Endpoints.item(1).X
'MsgBox Me.Polyline1.Endpoints.item(2).X
MsgBox "test"
End Sub
any insight to this would be appreciated