Creates and returns a new object in this container. | |
Syntax: | Set GefObject = object.AddPolyline ( PointArray, Closed ) |
Parameters: |
PointArray
As VARIANT -
Closed As
Boolean -
|
Description: | The bClosed parameter indicates whether or
not the polyline will be closed. If it is closed, a line is drawn
between the first and last vertices. The arrayPoints parameter may be a one-dimensional or a two-dimensional array of integers containing the X,Y coordinates of the line vertices. If it is a one-dimensional array the size of the array is the number of vertices times two. The first two elements are the X and Y coordinates of the first vertex. If it is a two-dimensional array the size of the first dimension is two and the size of the second dimension is the number of vertices. Example: Sub GefObjects_AddPolyline() Dim oCimScr As GefScreen Dim oCimObj As GefObject Dim oCimObjs As GefObjects Dim oCimLineObj As
GefObject Dim a(7) As Long Set oCimScr = CimGetScreen Set oCimObj =
oCimScr.Object Set oCimObjs =
oCimObj.Objects a(0) = 90 * 20 a(1) = 40 * 20 a(2) = 130 * 20 a(3) = 34 * 20 a(4) = 70 * 20 a(5) = 30 * 20 a(6) = 100 * 20 a(7) = 10 * 20 Set oCimLineObj =
oCimObjs.AddPolyline(a(), True) Dim oCimLineObj2 As
GefObject Dim b(1,3) As Long b(0,0) = 90 * 20 b(1,0) = 140 * 20 b(0,1) = 130 * 20 b(1,1) = 134 * 20 b(0,2) = 70 * 20 b(1,2) = 130 * 20 b(0,3) = 100 * 20 b(1,3) = 110 * 20 Set oCimLineObj2 =
oCimObjs.AddPolyline(b(), True) oCimScr.Refresh False End Sub |