AGI STK X 11Send comments on this topic.
Add Method (AgDrawElemCollection)
See Also
ElemType
Type of element to create. Currently only "Rect" is supported.
Windows






Windows & Linux

Description

Factory to create and add a new element to the end of the sequence.

Syntax

[Visual Basic .NET]
Public Function Add( _
    ByVal ElemType As String _
) As AgDrawElem
[C#]
public AgDrawElem Add(
    string ElemType
);
[Managed C++]
public: AgDrawElem^ Add(
    String __gc ^ ElemType
);
[Java]
public AgDrawElem add(
    String ElemType
);
[Unmanaged C++]
public: HRESULT Add(
    BSTR ElemType,
    AgDrawElem ** ppDrawElem
);

Parameters

ElemType
Type of element to create. Currently only "Rect" is supported.

Return Type

Returns a new drawing element (interface IAgDrawElem).

When the input parameter Type is "Rect", the return data is of type AgDrawElemRect.

If the input parameter Type is incorrect, an automation exception is raised.

See Also

Example

[Visual Basic .NET]
Private Sub AxAgUiAxVOCntrl1_MouseMoveEvent( _
ByVal sender As Object, _
ByVal e As AxAGI.STKX.IAgUiAxVOCntrlEvents_MouseMoveEvent) _
Handles AxAgUiAxVOCntrl1.MouseMoveEvent

If pickMode = 2 Then

If curRect Is Nothing Then

Dim r As AgDrawElemRect
r = Me.AxAgUiAxVOCntrl1.DrawElements.Add("Rect")

...

curRect = r

End If

curRect.Set(x0, y0, e.x, e.y)
End If

End Sub
© 2019 Analytical Graphics, Inc. All Rights Reserved.