AGI UI PluginsSend comments on this topic.
Path Property (IAgUiPluginSelectedObject)
See Also
Windows





Windows & Linux

Description

Returns a full path of the object.

Property type

Read-only property

Syntax

[Visual Basic .NET]
Public Property Path() As String
[C#]
public string Path {get;}
[Managed C++]
public: __property String __gc ^ get_Path();
[Unmanaged C++]
public: HRESULT get_Path(
    BSTR * pRetVal
);
[Java]
public String getPath();

Remarks

The semantics of the value returned by the Path property may differ depending on the hosting environment. In STK, the value returned by the Path property is a path of a valid STK object currently selected in the STK Object Browser. The Path can be used to get an instance of an STK object using the STK Object Model.

See Also

Example

The example demonstrates how to get an instance of an STK object using the STK Object Model.
Get an STK object using the STK Object Model
void IAgUiPluginCommandTarget.Exec(string CommandName, IAgProgressTrackCancel TrackCancel, IAgUiPluginCommandParameters Parameters)
{

//Controls what a command does
if (string.Compare(CommandName, "MyFirstCommand", true) == 0)
{
// _site is assigned the site passed to the plugin at startup.
// IAgUiPluginSite _site;

// Get an instance of the STK Object Model Root object
AGI.Ui.Application.IAgUiApplication AgUiApp = _site.Application;
AGI.STKObjects.IAgStkObjectRoot root = (AGI.STKObjects.IAgStkObjectRoot)AgUiApp.Personality2;

if (_site.Selection.Count != 0)
{
AGI.STKObjects.IAgStkObject o = root.GetObjectFromPath(_site.Selection[0].Path);
// Manipulate the STK object
}
}
}
© 2025 Analytical Graphics, Inc. All Rights Reserved.