AGI STK Graphics 11 Send comments on this topic.
SetSubset Method (IAgStkGraphicsPolylinePrimitive)
See Also  Example
Positions
An array of positions in the order x, y, z. The subset of this array defined by index and count define the new positions for the polyline.
Index
A zero-based index into positions that defines the first position copied to the polyline. Note that this index considers a set of x, y, and z coordinates as a single element.
Count
The number of elements in positions copied to the polyline. Note that is number considers a set of x, y, and z elements as a single element.





Description

Defines the positions of a polyline using a subset of input positions.

Syntax

[Visual Basic .NET]
Public Sub SetSubset( _
   ByRef Positions As System.Array, _
   ByVal Index As Integer, _
   ByVal Count As Integer _
) 

[C#]
public void SetSubset(
ref System.Array Positions,
int Index,
int Count
);

[Managed C++]
public: void SetSubset(
System::Array ^^ Positions,
int Index,
int Count
);

[Java]
public  setSubset(
Object[] Positions,
ppInteger Index,
ppInteger Count
);

[Unmanaged C++]
public: HRESULT SetSubset(
SAFEARRAY ** Positions,
int Index,
int Count
);

Parameters

Positions
An array of positions in the order x, y, z. The subset of this array defined by index and count define the new positions for the polyline.
Index
A zero-based index into positions that defines the first position copied to the polyline. Note that this index considers a set of x, y, and z coordinates as a single element.
Count
The number of elements in positions copied to the polyline. Note that is number considers a set of x, y, and z elements as a single element.

Remarks

When the caller has an array of positions and wants to define a polyline primitive using a continuous subset of the array, calling SetSubset is more convenient and efficient than copying the positions into a temporary array and calling Set

Example

Shows the format of the Positions parameter when updating a polyline primitive.
[C#] Copy Code
Array positions = new object[] 

    1247.87, -4739.744067.77
    1115.48, -4847.093979.36
    -24.12, -5529.313168.45
    -2683.42, -4307.743850.11 
}; 
 
polyline.SetSubset( 
    ref positions, 
    1
    2); 
 

Shows the format of the Positions parameter when updating a polyline primitive.
[Visual Basic .NET] Copy Code
Dim positions As Array = New Object() {1247.87, -4739.74, 4067.77, 1115.48, -4847.09, 3979.36, _
    -24.12, -5529.31, 3168.45, -2683.42, -4307.74, 3850.11}

polyline.SetSubset(positions, 1, 2)

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1