GefObjects.AddPolyline2 (method)

Creates and returns a new object in this container.
Syntax: Set GefObject = object.AddPolyline2 ( PointArray, Closed )
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.


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
    Set lines = Nothing
End Sub