GefObjects.AddPolyline2 (method)

Creates and returns a new object in this container.
Syntax: Set GefObject = object.AddPolyline2 ( PointArray, Closed )
Parameters:
PointArray As IUnknown* -
Closed As Boolean -
Description: Works just like AddPolyline except it takes a CoCimSafeArray3 object for the array instead of a Basic array.

Example:

Sub OnSmartObject()
    Dim lines As CoCimSafeArray2
    Set lines = CreateObject("CIMPLICITY.CimSafeArray.2")
    lines.CreateVector cimVLong, 0, 4
    lines.SetVectorElement 0, 100
    lines.SetVectorElement 1, 100
    lines.SetVectorElement 2, 900
    lines.SetVectorElement 3, 900
    CimGetScreen.Object.Objects.AddPolyline2 lines, False
    CimGetScreen.Refresh
    Set lines = Nothing
End Sub