STK UI ApplicationSend comments on this topic.
DisplayAlerts Property (IAgUiApplication)
See Also
Windows





Windows & Linux

Description

Set to true to display certain alerts and messages. Otherwise false. The default value is True.

Property type

Read-write property

Syntax

[Visual Basic .NET]
Public Property DisplayAlerts() As Boolean
[C#]
public bool DisplayAlerts {get; set;}
[Managed C++]
public: __property bool get_DisplayAlerts();
public: __property void set_DisplayAlerts( bool );
[Unmanaged C++]
public: HRESULT get_DisplayAlerts(
    VARIANT_BOOL * pRetVal
);
public: HRESULT put_DisplayAlerts(
    VARIANT_BOOL DisplayAlerts
);
[Java]
public bool getDisplayAlerts();
public void setDisplayAlerts(
    bool
);

See Also

Example

Get a reference to the AgStkObjectRoot with display alerts turned off.
[C#]
// Get reference to running STK instance
AgUiApplication uiApplication = System.Runtime.InteropServices.Marshal.GetActiveObject("STK12.Application") as AgUiApplication;

//Create a new instance of the application model root object. 
AgUiApplication uiApplication2 = uiApplication.CreateApplication() as AgUiApplication;
//Set DisplayAlerts to false to suppress certain alerts and messages.
//This is useful when automating tasks.
uiApplication2.DisplayAlerts = false;
// Get our IAgStkObjectRoot interface with display alerts turned off
IAgStkObjectRoot stkRoot = uiApplication2.Personality2 as IAgStkObjectRoot;
Get a reference to the AgStkObjectRoot with display alerts turned off.
[Visual Basic .NET]
' Get reference to running STK instance
Dim uiApplication As AgUiApplication = TryCast(System.Runtime.InteropServices.Marshal.GetActiveObject("STK12.Application"), AgUiApplication)

'Create a new instance of the application model root object. 
Dim uiApplication2 As AgUiApplication = TryCast(uiApplication.CreateApplication(), AgUiApplication)

'Set DisplayAlerts to false to suppress certain alerts and messages.
'This is useful when automating tasks.
uiApplication2.DisplayAlerts = False

' Get our IAgStkObjectRoot interface with display alerts turned off
Dim stkRoot As IAgStkObjectRoot = TryCast(uiApplication2.Personality2, IAgStkObjectRoot)
© 2024 Analytical Graphics, Inc. All Rights Reserved.