CentralBodyCollection#

class ansys.stk.core.stkobjects.CentralBodyCollection#

Central body collection coclass.

Overview#

contains

Search for a central body with a given name. Returns false if the specified element does not exist.

item

Return a central body by name or at a specified position.

get_item_by_index

Retrieve a central body from the collection by index.

get_item_by_name

Retrieve a central body from the collection by name.

earth

Return the Earth central body.

sun

Return the Sun central body.

moon

Return the Moon central body.

count

Return a number of elements in the collection.

_new_enum

Enumerates the elements in the collection.

Import detail#

from ansys.stk.core.stkobjects import CentralBodyCollection

Property detail#

property CentralBodyCollection.earth: CentralBody#

Return the Earth central body.

property CentralBodyCollection.sun: CentralBody#

Return the Sun central body.

property CentralBodyCollection.moon: CentralBody#

Return the Moon central body.

property CentralBodyCollection.count: int#

Return a number of elements in the collection.

property CentralBodyCollection._new_enum: EnumeratorProxy#

Enumerates the elements in the collection.

Method detail#

CentralBodyCollection.contains(self, central_name: str) bool#

Search for a central body with a given name. Returns false if the specified element does not exist.

Parameters:

central_name : str

Returns:

bool

CentralBodyCollection.item(self, index_or_name: Any) CentralBody#

Return a central body by name or at a specified position.

Parameters:

index_or_name : Any

Returns:

CentralBody

CentralBodyCollection.get_item_by_index(self, index: int) CentralBody#

Retrieve a central body from the collection by index.

Parameters:

index : int

Returns:

CentralBody

CentralBodyCollection.get_item_by_name(self, cb_name: str) CentralBody#

Retrieve a central body from the collection by name.

Parameters:

cb_name : str

Returns:

CentralBody