How to suppress multiple time-steps in a load object based on some logic?

Ayush Kumar
Member, Moderator, Employee Posts: 472
✭✭✭✭
I want to suppress the step when displacement reaches zero or below -0.1. However, the example is just a simplified version of displacement input, the actual one is far more complicated.
Can I suppress certain time steps as one go, rather than doing individually and manually. Because it will too time consuming.
Tagged:
0
Answers
-
One can use
SetPropertyByStep
function of the internal load object and build a logic around it. Example code below suppresses all the steps with YComponent values below zero:displacement = ExtAPI.DataModel.Tree.ActiveObjects[0] original_step_values = displacement.YComponent.Output.DiscreteValues for index, entry in enumerate(original_step_values, start=1): if entry.Value < 0.0: displacement.InternalObject.SetPropertyByStep(index, "Active", False)
4