STK ObjectsSend comments on this topic.
SetLocationType Method (IAgSensor)
See Also
LocationType
Windows





Windows & Linux

Description

Set the sensor's location type, a member of the AgESnLocation enumeration.

Syntax

[Visual Basic .NET]
Public Sub SetLocationType( _
    ByVal LocationType As AgESnLocation _
)
[C#]
public void SetLocationType(
    AgESnLocation LocationType
);
[Managed C++]
public: void SetLocationType(
    AgESnLocation LocationType
);
[Unmanaged C++]
public: HRESULT SetLocationType(
    AgESnLocation LocationType
);
[Java]
public void setLocationType(
    AgESnLocation LocationType
);
[Python - STK API ]
def SetLocationType(self, LocationType:"AgESnLocation") -> None:

Parameters

LocationType

See Also

Example

Define location from Vector Geometry Tool point
[C#]
// Set location type to VGT
sensor.SetLocationType(AgESnLocation.eSnLocationCrdnPoint);

// Get IAgLocationCrdnPoint interface
IAgLocationCrdnPoint vgtPoint = sensor.LocationData as IAgLocationCrdnPoint;

// point sensor to an already existing object
vgtPoint.PointPath = "Facility/Facility1 Center";
Define location from Vector Geometry Tool point
[Visual Basic .NET]
' Set location type to VGT
sensor.SetLocationType(AgESnLocation.eSnLocationCrdnPoint)

' Get IAgLocationCrdnPoint interface
Dim vgtPoint As IAgLocationCrdnPoint = TryCast(sensor.LocationData, IAgLocationCrdnPoint)

' point sensor to an already existing object
vgtPoint.PointPath = "Facility/Facility1 Center"
© 2024 Analytical Graphics, Inc. All Rights Reserved.