CompositeDisplayCondition#
- class ansys.stk.core.graphics.CompositeDisplayCondition#
Bases:
IDisplayCondition
A composite of display conditions combined using a binary logic operation. For example, several time interval display condition objects can be added to a compositeβ¦
Overview#
Return the condition at the given zero-based index. |
|
Request enough memory for the composite to contain at least count display conditions. count will not be affected but capacity may be. |
|
Add a display condition to the end of the composite. |
|
Add a display condition to the end of the composite. |
|
Insert a display condition at the given zero-based index, shifting existing display conditions. |
|
Insert a display condition at the given zero-based index, shifting existing display conditions. |
|
Remove a display condition from the composite. |
|
Remove the display condition at the given zero-based index, shifting existing display conditions. |
|
Remove all display conditions from the composite. |
|
Determine if a logical not operation is applied to a display condition in the composite. |
|
Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated. |
|
Determine if a logical not operation is applied to a display condition in the composite. |
|
Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated. |
Get the number of display conditions in the composite. |
|
Get the number of display conditions for which memory has been allocated. This will always be greater or equal to count. |
|
Get or set the binary logic operation applied to all display conditions in the composite when the composite is evaluated. To combine logical and and or operations in the same expression, create composites containing composites. |
|
Return an enumerator that iterates through the collection. |
Examples#
Display a Primitive During an Interval
# Scenario scenario: Scenario object
# ModelPrimitive model: Graphics Primitive
manager = scenario.scene_manager
composite = manager.initializers.composite_display_condition.initialize()
root.units_preferences.item("DateFormat").set_current_unit("EpSec")
start = root.conversion_utility.new_date("EpSec", str(scenario.start_time))
stop = root.conversion_utility.new_date("EpSec", str(scenario.start_time + 600))
timeInterval = manager.initializers.time_interval_display_condition.initialize_with_times(start, stop)
composite.add(timeInterval)
model.display_condition = composite
Import detail#
from ansys.stk.core.graphics import CompositeDisplayCondition
Property detail#
- property CompositeDisplayCondition.count: int#
Get the number of display conditions in the composite.
- property CompositeDisplayCondition.capacity: int#
Get the number of display conditions for which memory has been allocated. This will always be greater or equal to count.
- property CompositeDisplayCondition.logic_operation: BinaryLogicOperation#
Get or set the binary logic operation applied to all display conditions in the composite when the composite is evaluated. To combine logical and and or operations in the same expression, create composites containing composites.
- property CompositeDisplayCondition._new_enum: EnumeratorProxy#
Return an enumerator that iterates through the collection.
Method detail#
- CompositeDisplayCondition.item(self, index: int) IDisplayCondition #
Return the condition at the given zero-based index.
- Parameters:
index :
int
- Returns:
IDisplayCondition
- CompositeDisplayCondition.reserve(self, count: int) None #
Request enough memory for the composite to contain at least count display conditions. count will not be affected but capacity may be.
- CompositeDisplayCondition.add_with_negate(self, display_condition: IDisplayCondition, negate: bool) None #
Add a display condition to the end of the composite.
- CompositeDisplayCondition.add(self, display_condition: IDisplayCondition) None #
Add a display condition to the end of the composite.
- Parameters:
display_condition :
IDisplayCondition
- Returns:
- CompositeDisplayCondition.insert_with_negate(self, index: int, display_condition: IDisplayCondition, negate: bool) None #
Insert a display condition at the given zero-based index, shifting existing display conditions.
- CompositeDisplayCondition.insert(self, index: int, display_condition: IDisplayCondition) None #
Insert a display condition at the given zero-based index, shifting existing display conditions.
- CompositeDisplayCondition.remove(self, display_condition: IDisplayCondition) None #
Remove a display condition from the composite.
- Parameters:
display_condition :
IDisplayCondition
- Returns:
- CompositeDisplayCondition.remove_at(self, index: int) None #
Remove the display condition at the given zero-based index, shifting existing display conditions.
- CompositeDisplayCondition.clear(self) None #
Remove all display conditions from the composite.
- Returns:
- CompositeDisplayCondition.get_negate(self, display_condition: IDisplayCondition) bool #
Determine if a logical not operation is applied to a display condition in the composite.
- Parameters:
display_condition :
IDisplayCondition
- Returns:
- CompositeDisplayCondition.set_negate(self, display_condition: IDisplayCondition, negate: bool) None #
Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated.