Description
Represents a 2D (Map) window. Provides
methods and properties to access the 2D window properties.
Public Properties
MapID |
A unique identifier
associated with the window that can be used with Connect to control
the 2D map. |
Example
Enumerate all 2D
(Map) windows and print their map identifiers.
[C#] |
Copy Code
|
foreach (IAgUiWindow window in application.Windows)
{
object oSvc = window.GetServiceByType(AgEWindowService.eWindowService2DWindow);
IAgUiWindowMapObject mapObject = oSvc as IAgUiWindowMapObject;
if (mapObject != null)
{
Console.WriteLine("Window Title: {0}, scene ID: {1}", window.Caption, mapObject.MapID);
}
}
|
|
Enumerate all 2D
(Map) windows and print their map identifiers.
[C#] |
Copy Code
|
foreach (IAgUiWindow window in application.Windows)
{
object oSvc = window.GetServiceByName("Map");
IAgUiWindowMapObject mapObject = oSvc as IAgUiWindowMapObject;
if (mapObject != null)
{
Console.WriteLine("Window Title: {0}, scene ID: {1}", window.Caption, mapObject.MapID);
}
}
|
|
Enumerate all 2D
(Map) windows and print their map identifiers.
[Visual Basic .NET] |
Copy Code
|
For Each window
As IAgUiWindow In application.Windows
Dim oSvc
As Object
=
window.GetServiceByType(AgEWindowService.eWindowService2DWindow)
Dim mapObject
As IAgUiWindowMapObject =
TryCast(oSvc, IAgUiWindowMapObject)
If mapObject
IsNot Nothing Then
Console.WriteLine("Window
Title: {0}, scene ID: {1}", window.Caption,
mapObject.MapID)
End
If
Next
|
|
Enumerate all 2D
(Map) windows and print their map identifiers.
[Visual Basic .NET] |
Copy Code
|
For Each window
As IAgUiWindow In application.Windows
Dim oSvc
As Object
= window.GetServiceByName("Map")
Dim mapObject
As IAgUiWindowMapObject =
TryCast(oSvc, IAgUiWindowMapObject)
If mapObject
IsNot Nothing Then
Console.WriteLine("Window
Title: {0}, scene ID: {1}", window.Caption,
mapObject.MapID)
End
If
Next
|
|