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#
Add a display condition to the end of the composite. |
|
Add a display condition to the end of the composite. |
|
Remove all display conditions from the composite. |
|
Determine if a logical not operation is applied to a display condition in the composite. |
|
Determine if a logical not operation is applied to a display condition in 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. |
|
Return the condition at the given zero-based index. |
|
Remove a display condition from the composite. |
|
Remove the display condition at the given zero-based index, shifting existing display conditions. |
|
Request enough memory for the composite to contain at least count display conditions. count will not be affected but capacity may be. |
|
Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated. |
|
Set if a logical not operation is applied to a display condition in the composite when the composite is evaluated. |
Return an enumerator that iterates through the collection. |
|
Get the number of display conditions for which memory has been allocated. This will always be greater or equal to count. |
|
Get the number of display conditions in the composite. |
|
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. |
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._new_enum: EnumeratorProxy#
Return an enumerator that iterates through the collection.
- 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.count: int#
Get the number of display conditions in the composite.
- 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.
Method detail#
- CompositeDisplayCondition.add(self, display_condition: IDisplayCondition) None #
Add a display condition to the end of the composite.
- Parameters:
display_condition :
IDisplayCondition
- Returns:
- CompositeDisplayCondition.add_with_negate(self, display_condition: IDisplayCondition, negate: bool) None #
Add a display condition to the end of the composite.
- 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.get_negate_at(self, index: int) bool #
Determine if a logical not operation is applied to a display condition in the composite.
- CompositeDisplayCondition.insert(self, index: int, display_condition: IDisplayCondition) None #
Insert a display condition at the given zero-based index, shifting existing display conditions.
- 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.item(self, index: int) IDisplayCondition #
Return the condition at the given zero-based index.
- Parameters:
index :
int
- Returns:
IDisplayCondition
- 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.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.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.