Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ansys/stk/core/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16179,7 +16179,7 @@ def __setattr__(self, attrname, value):

@property
def Text(self) -> str:
"""Sets the Text to be rendered to an overlay. Newline characters ('\n') will mark the start of the next line in the text."""
r"""Sets the Text to be rendered to an overlay using newline characters ('\n') to mark the start of the next line in the text."""
with agmarshall.BSTR_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetText"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down
11 changes: 7 additions & 4 deletions src/ansys/stk/core/internal/comutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,15 @@ def TakeOwnership(self, isApplication=False):
"""Registers the pointer to be Released when the ref count goes to zero but does not call AddRef."""
ObjectLifetimeManager.TakeOwnership(self, isApplication)
def AddRef(self):
"""Increments the ref count on the pointer if the pointer was registered with CreateOwnership or TakeOwnership."""
"""Increments the ref count if the pointer was registered.

Pointer registration must be done by CreateOwnership or TakeOwnership.
"""
ObjectLifetimeManager.InternalAddRef(self)
def Release(self):
"""
Decrements the ref count on the pointer if the pointer was registered with CreateOwnership or TakeOwnership.
Calls Release if the ref count goes to zero.
"""Decrements the ref count if the pointer was registered. Calls Release if the ref count goes to zero.

Pointer registration must be done by CreateOwnership or TakeOwnership.
"""
ObjectLifetimeManager.Release(self)

Expand Down
4 changes: 4 additions & 0 deletions src/ansys/stk/core/internal/marshall.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,8 @@ def python_val(self) -> typing.Any:
class AgInterface_in_arg(object):
def __init__(self, val, as_interface):
"""
Initialize an AgInterface_in_arg object.

val should be a python CoClass object (e.g. AgFacility)
as_interface is the interface class to send to STK
"""
Expand Down Expand Up @@ -812,6 +814,8 @@ def python_val(self) -> typing.Any:
class AgInterface_event_callback_arg(object):
def __init__(self, pUnk:agcom.PVOID, as_interface):
"""
Initialize an AgInterface_event_callback_arg object.

pUnk should be a IUnknown pointer as PVOID
as_interface is the interface class to send to STK
"""
Expand Down
10 changes: 6 additions & 4 deletions src/ansys/stk/core/stkdesktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ def ReleaseThread(self) -> None:

class STKDesktopApplication(UiApplication):
"""
Interact with an STK Desktop application. Use STKDesktop.StartApplication() or
STKDesktop.AttachToApplication() to obtain an initialized STKDesktopApplication object.
Interact with an STK Desktop application.

Use STKDesktop.StartApplication() or STKDesktop.AttachToApplication()
to obtain an initialized STKDesktopApplication object.
"""
def __init__(self):
if os.name != "nt":
Expand Down Expand Up @@ -123,10 +125,10 @@ class STKDesktop(object):
def StartApplication(visible:bool=False, userControl:bool=False) -> STKDesktopApplication:
"""
Create a new STK Desktop application instance.

Specify visible = True to show the application window.
Specify userControl = True to return the application to the user's control
(the application remains open) after terminating the Python API connection.

Only available on Windows.
"""
if os.name != "nt":
Expand All @@ -150,10 +152,10 @@ def StartApplication(visible:bool=False, userControl:bool=False) -> STKDesktopAp
def AttachToApplication(pid:int=None) -> STKDesktopApplication:
"""
Attach to an existing STK Desktop instance.

Specify the Process ID (PID) in case multiple processes are open.
Specify userControl = True to return the application to the user's control
(the application remains open) after terminating the Python API connection.

Only available on Windows.
"""
if os.name != "nt":
Expand Down
6 changes: 6 additions & 0 deletions src/ansys/stk/core/stkengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class STKEngineTimerType(IntEnum):
class STKEngineApplication(STKXApplication):
"""
Interact with STK Engine.

Use STKEngine.StartApplication() to obtain an initialized STKEngineApplication object.
"""
def __init__(self):
Expand Down Expand Up @@ -173,6 +174,7 @@ def _initX11(noGraphics):
def StartApplication(noGraphics:bool=True) -> STKEngineApplication:
"""
Initialize STK Engine in-process and return the instance.

Must only be used once per Python process.
"""
if STKEngine._is_engine_running:
Expand All @@ -196,6 +198,8 @@ def StartApplication(noGraphics:bool=True) -> STKEngineApplication:
@staticmethod
def SetSTKInstallDir(stkInstallDir:str) -> None:
"""
Set the STK install directory.

Setting the install directory using this method will override the STK_INSTALL_DIR environment variable.
If this method is not called, STK_INSTALL_DIR will be used instead. This method must be called before
StartApplication().
Expand All @@ -205,6 +209,8 @@ def SetSTKInstallDir(stkInstallDir:str) -> None:
@staticmethod
def SetSTKConfigDir(stkConfigDir:str) -> None:
"""
Set the STK config directory.

Setting the config directory using this method will override the STK_CONFIG_DIR environment variable.
If this method is not called, STK_CONFIG_DIR will be used instead. This method must be called before
StartApplication().
Expand Down
40 changes: 20 additions & 20 deletions src/ansys/stk/core/stkobjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9906,7 +9906,7 @@ def IsFailure(self) -> bool:
agcls.AgTypeNameMap["IDataProviderResultTextMessage"] = IDataProviderResultTextMessage

class IDataProviderElement(object):
"""Provides methods to access the information about the element (for instance \"x\")."""
"""Provides methods to access the information about the element (for instance ``x``)."""
_uuid = "{1F039448-8D5A-487A-ACC0-5F05124A72D4}"
_num_methods = 3
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
Expand Down Expand Up @@ -9968,7 +9968,7 @@ def DimensionName(self) -> str:
agcls.AgTypeNameMap["IDataProviderElement"] = IDataProviderElement

class IDataProviderElements(object):
"""Represents a collection of elements in the data provider (for instance \"x\", \"y\", \"z\")."""
"""Represents a collection of elements in the data provider (for instance ``x``, ``y``, ``z``)."""
_uuid = "{AFBF289F-4952-4412-B867-F2BEAA85C941}"
_num_methods = 5
_vtable_offset = IDispatch._vtable_offset + IDispatch._num_methods
Expand Down Expand Up @@ -10125,7 +10125,7 @@ def Count(self) -> int:
agcls.AgTypeNameMap["IDataProviderResultTimeArrayElements"] = IDataProviderResultTimeArrayElements

class IDataProvider(object):
"""Represents the Sub Data Provider (i.e. \"Fixed\" in \"Cartesian Position\" group on satellites, or \"Cartesian Position\" on facilities)."""
"""Represents the Sub Data Provider (i.e. ``Fixed`` in ``Cartesian Position`` group on satellites, or ``Cartesian Position`` on facilities)."""
_uuid = "{0540BEBC-7C02-478C-B8F5-CFDB0F04FC20}"
_num_methods = 9
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
Expand Down Expand Up @@ -10343,7 +10343,7 @@ def GetItemByName(self, name:str) -> "IDataProviderInfo":
agcls.AgTypeNameMap["IDataProviders"] = IDataProviders

class IDataProviderGroup(object):
"""Represents a group of data providers (for instance \"Cartesian Position\" on satellite)."""
"""Represents a group of data providers (for instance ``Cartesian Position`` on satellite)."""
_uuid = "{6578CE07-08C7-4B3F-AEE3-05110A190F6B}"
_num_methods = 1
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
Expand Down Expand Up @@ -11219,7 +11219,7 @@ def StopTime(self) -> "ITimePeriodValue":

@property
def Duration(self) -> typing.Any:
"""A time duration. The value is a relative duration (i.e. \"+1 day\", \"+1 hour\")"""
"""A time duration. The value is a relative duration (i.e. ``+1 day``, ``+1 hour``)"""
with agmarshall.VARIANT_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetDuration"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down Expand Up @@ -16082,7 +16082,7 @@ def SetTimeComponent(self, component:"IAnalysisWorkbenchComponent") -> None:
agcls.evaluate_hresult(self.__dict__["_SetTimeComponent"](arg_component.COM_val))

def SetQualifiedPath(self, qualifiedPath:str) -> None:
"""Configure the display times using the specified time component. Allowed are only intervals and interval lists. QualifiedPath format adheres to the format used throughout VGT API (i.e. \"Scenario/Scenario1 AnalysisInterval EventInterval\")."""
"""Configure the display times using the specified time component. Allowed are only intervals and interval lists. QualifiedPath format adheres to the format used throughout VGT API (i.e. ``Scenario/Scenario1 AnalysisInterval EventInterval``)."""
with agmarshall.BSTR_arg(qualifiedPath) as arg_qualifiedPath:
agcls.evaluate_hresult(self.__dict__["_SetQualifiedPath"](arg_qualifiedPath.COM_val))

Expand Down Expand Up @@ -27967,7 +27967,7 @@ def StopTime(self) -> "ITimePeriodValue":

@property
def Duration(self) -> typing.Any:
"""A time duration. The value is a relative duration (i.e. \"+1 day\", \"+1 hour\")"""
"""A time duration. The value is a relative duration (i.e. ``+1 day``, ``+1 hour``)"""
with agmarshall.VARIANT_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetDuration"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down Expand Up @@ -28221,7 +28221,7 @@ def SetTimeArrayComponent(self, component:"IAnalysisWorkbenchComponent") -> None
agcls.evaluate_hresult(self.__dict__["_SetTimeArrayComponent"](arg_component.COM_val))

def SetTimeArrayQualifiedPath(self, qualifiedPath:str) -> None:
"""Configure the time array using the specified time component. Allowed are only event arrays. QualifiedPath format adheres to the format used throughout VGT API (i.e. \"Scenario/Scenario1 OneMinuteSampleTimes EventArray\")."""
"""Configure the time array using the specified time component. Allowed are only event arrays. QualifiedPath format adheres to the format used throughout VGT API (i.e. ``Scenario/Scenario1 OneMinuteSampleTimes EventArray``)."""
with agmarshall.BSTR_arg(qualifiedPath) as arg_qualifiedPath:
agcls.evaluate_hresult(self.__dict__["_SetTimeArrayQualifiedPath"](arg_qualifiedPath.COM_val))

Expand Down Expand Up @@ -29438,7 +29438,7 @@ def StopTime(self) -> "ITimePeriodValue":

@property
def Duration(self) -> typing.Any:
"""A time duration. The value is a relative duration (i.e. \"+1 day\", \"+1 hour\")"""
"""A time duration. The value is a relative duration (i.e. ``+1 day``, ``+1 hour``)"""
with agmarshall.VARIANT_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetDuration"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down Expand Up @@ -29878,21 +29878,21 @@ def CatalogName(self) -> str:

@property
def RA(self) -> float:
"""Right ascention. Use the \"Angle\" dimension."""
"""Right ascention. Use the ``Angle`` dimension."""
with agmarshall.DOUBLE_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetRA"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val

@property
def Dec(self) -> float:
"""Declination. Use the \"Angle\" dimension."""
"""Declination. Use the ``Angle`` dimension."""
with agmarshall.DOUBLE_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetDec"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val

@property
def Parallax(self) -> float:
"""Trigonometric parallax. Use the \"Angle\" dimension."""
"""Trigonometric parallax. Use the ``Angle`` dimension."""
with agmarshall.DOUBLE_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetParallax"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down Expand Up @@ -29920,7 +29920,7 @@ def BminusV(self) -> float:

@property
def EffectiveTemperature(self) -> float:
"""Star's effective temperature. Use the \"Temperature\" dimension."""
"""Star's effective temperature. Use the ``Temperature`` dimension."""
with agmarshall.DOUBLE_arg() as arg_pRetVal:
agcls.evaluate_hresult(self.__dict__["_GetEffectiveTemperature"](byref(arg_pRetVal.COM_val)))
return arg_pRetVal.python_val
Expand Down Expand Up @@ -60700,15 +60700,15 @@ def RemoveAt(self, index:int) -> None:
agcls.evaluate_hresult(self.__dict__["_RemoveAt"](arg_index.COM_val))

def InsertAt(self, index:int, componentIdentifier:str) -> "IRadarActivityTimeComponentListElement":
"""Inserts a new time component element at the supplied index, configured with a component with the supplied identifier. An example of a valid component identifier would be \"Facility/MFR_Facility/Radar/MFR LightingIntervals.Umbra EventIntervalList\"."""
"""Inserts a new time component element at the supplied index, configured with a component with the supplied identifier. An example of a valid component identifier would be ``Facility/MFR_Facility/Radar/MFR LightingIntervals.Umbra EventIntervalList``."""
with agmarshall.INT_arg(index) as arg_index, \
agmarshall.BSTR_arg(componentIdentifier) as arg_componentIdentifier, \
agmarshall.AgInterface_out_arg() as arg_ppVal:
agcls.evaluate_hresult(self.__dict__["_InsertAt"](arg_index.COM_val, arg_componentIdentifier.COM_val, byref(arg_ppVal.COM_val)))
return arg_ppVal.python_val

def Add(self, componentIdentifier:str) -> "IRadarActivityTimeComponentListElement":
"""Adds a new time component element to the collection, configured with a component with the supplied identifier. An example of a valid component identifier would be \"Facility/MFR_Facility/Radar/MFR LightingIntervals.Umbra EventIntervalList\"."""
"""Adds a new time component element to the collection, configured with a component with the supplied identifier. An example of a valid component identifier would be ``Facility/MFR_Facility/Radar/MFR LightingIntervals.Umbra EventIntervalList``."""
with agmarshall.BSTR_arg(componentIdentifier) as arg_componentIdentifier, \
agmarshall.AgInterface_out_arg() as arg_ppVal:
agcls.evaluate_hresult(self.__dict__["_Add"](arg_componentIdentifier.COM_val, byref(arg_ppVal.COM_val)))
Expand Down Expand Up @@ -83986,7 +83986,7 @@ def TimeStep(self, timeStep:float) -> None:

@property
def TimeoutGap(self) -> float:
"""Specify the time after which look ahead values are considered to be \"stale\" (that is, the data has dropped out). Valid value is between 1.0 and 1000000.0 seconds. """
"""Specify the time after which look ahead values are considered to be ``stale`` (that is, the data has dropped out). Valid value is between 1.0 and 1000000.0 seconds. """
with agmarshall.DOUBLE_arg() as arg_pVal:
agcls.evaluate_hresult(self.__dict__["_GetTimeoutGap"](byref(arg_pVal.COM_val)))
return arg_pVal.python_val
Expand Down Expand Up @@ -92629,7 +92629,7 @@ def RemoveAll(self) -> None:
agcls.evaluate_hresult(self.__dict__["_RemoveAll"]())

def Add(self, qualifiedPath:str) -> "IVehicleGfxTimeComponentsElement":
"""Adds a new element to the collection using the specified fully qualified component's path (i.e. \"Scenario/Scenario1 AnalysisInterval EventInterval\"). Only intervals, interval lists or interval collections are allowed."""
"""Adds a new element to the collection using the specified fully qualified component's path (i.e. ``Scenario/Scenario1 AnalysisInterval EventInterval``). Only intervals, interval lists or interval collections are allowed."""
with agmarshall.BSTR_arg(qualifiedPath) as arg_qualifiedPath, \
agmarshall.AgInterface_out_arg() as arg_ppRetVal:
agcls.evaluate_hresult(self.__dict__["_Add"](arg_qualifiedPath.COM_val, byref(arg_ppRetVal.COM_val)))
Expand Down Expand Up @@ -99117,7 +99117,7 @@ def __setattr__(self, attrname, value):

@property
def BMag(self) -> float:
"""The magnitude of B vector. For more information see \"B-Plane Targeting\". Uses Distance Dimension."""
"""The magnitude of B vector. For more information see ``B-Plane Targeting``. Uses Distance Dimension."""
with agmarshall.DOUBLE_arg() as arg_pVal:
agcls.evaluate_hresult(self.__dict__["_GetBMag"](byref(arg_pVal.COM_val)))
return arg_pVal.python_val
Expand Down Expand Up @@ -127210,7 +127210,7 @@ def __setattr__(self, attrname, value):


class DataProviderGroup(IDataProviderInfo, IDataProviderGroup):
"""Group of sub data providers (e.g. \"Cartesian Position\" on Satellites)."""
"""Group of sub data providers (e.g. ``Cartesian Position`` on Satellites)."""
def __init__(self, sourceObject=None):
IDataProviderInfo.__init__(self, sourceObject)
IDataProviderGroup.__init__(self, sourceObject)
Expand All @@ -127234,7 +127234,7 @@ def __setattr__(self, attrname, value):


class DataProviderElements(IDataProviderElements):
"""Elements returned by the data provider (e.g. \"x\", \"y\", \"z\")."""
"""Elements returned by the data provider (e.g. ``x``, ``y``, ``z``)."""
def __init__(self, sourceObject=None):
IDataProviderElements.__init__(self, sourceObject)
def _private_init(self, pUnk:IUnknown):
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/stk/core/stkobjects/astrogator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10382,7 +10382,7 @@ def TrueAnomaly(self, newVal:typing.Any) -> None:

@property
def ApoapsisAltitudeSize(self) -> float:
"""Measured from the \"surface\" of the Earth to the points of maximum and minimum radius in the orbit. For these values, the surface of the Earth is modeled as a sphere whose radius equals the equatorial radius of the Earth. Uses Distance dimension."""
"""Measured from the ``surface`` of the Earth to the points of maximum and minimum radius in the orbit. For these values, the surface of the Earth is modeled as a sphere whose radius equals the equatorial radius of the Earth. Uses Distance dimension."""
with agmarshall.DOUBLE_arg() as arg_pVal:
agcls.evaluate_hresult(self.__dict__["_GetApoapsisAltitudeSize"](byref(arg_pVal.COM_val)))
return arg_pVal.python_val
Expand Down Expand Up @@ -10419,7 +10419,7 @@ def MeanMotion(self, inVal:float) -> None:

@property
def PeriapsisAltitudeSize(self) -> float:
"""Measured from the \"surface\" of the Earth to the points of maximum and minimum radius in the orbit. For these values, the surface of the Earth is modeled as a sphere whose radius equals the equatorial radius of the Earth. Uses Distance dimension."""
"""Measured from the ``surface`` of the Earth to the points of maximum and minimum radius in the orbit. For these values, the surface of the Earth is modeled as a sphere whose radius equals the equatorial radius of the Earth. Uses Distance dimension."""
with agmarshall.DOUBLE_arg() as arg_pVal:
agcls.evaluate_hresult(self.__dict__["_GetPeriapsisAltitudeSize"](byref(arg_pVal.COM_val)))
return arg_pVal.python_val
Expand Down
2 changes: 2 additions & 0 deletions src/ansys/stk/core/utilities/colors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2020-2020, Analytical Graphics, Inc.
"""
This module is used to communicate color information between Python and STK.

Color is the color object type and Colors is the factory for creating Color objects.
"""

Expand Down Expand Up @@ -86,6 +87,7 @@ def FromRGB(r:int, g:int, b:int) -> Color:
class Colors(object):
"""
A factory for creating Color objects that may be used with the STK object model.

Contains factory methods and named colors.
"""
@staticmethod
Expand Down
1 change: 1 addition & 0 deletions src/ansys/stk/core/utilities/comobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
class COMObject(object):
"""
Holds a raw COM pointer.

May be returned from STK if the return argument is not part of the STK Object Model.
"""
def __init__(self):
Expand Down
Loading