Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
How do I get the envelope of all combinations from the beginning and end of each bar?
I wrote the code below but it goes through all combinations and all bars. It takes too long.
I saw several examples on the forum, but I didn't quite understand the logic applied.
public List<InternalForces> GetInternalForces()
{
List<double> FX = new List<double>();
RobotCaseCollection caseCollection = new RobotCaseCollection();
rSelection = RobotApp.Project.Structure.Selections.Create(IRobotObjectType.I_OT_CASE);
ForceServer = RobotApp.Project.Structure.Results.Bars.Forces;
rSelection.AddText("todos");
caseCollection = RobotApp.Project.Structure.Cases.GetMany(rSelection);
if (RobotApp.Project.Structure.Results.Available == -1 )
{
for (int i = 0; i < OrdenadesProfiles.Count; i++)
{
for (int j = 1; j < caseCollection.Count; j++)
{
if (CaseType == IRobotCaseAnalizeType.I_CAT_COMB || CaseType == IRobotCaseAnalizeType.I_CAT_COMB_CODE || CaseType == IRobotCaseAnalizeType.I_CAT_COMB_NONLINEAR)
{
robotCase = caseCollection.Get(j);
int casNumber = robotCase.Number;
DataForce = ForceServer.Value(OrdenadesProfiles[i].Number, casNumber, 0.0);
FX.Add(DataForce.FX);
DataForce = ForceServer.Value(OrdenadesProfiles[i].Number, casNumber, 1.0);
FX.Add(DataForce.FX);
}
}
BarNumber = OrdenadesProfiles[i].Number;
FXMax = FX.Max();
FXMin = FX.Min();
}
internalForces.Add(new InternalForces(BarNumber,FXMax, FXMin));
}
else
{
MessageBox.Show("Modelo sem Resultados!","AVISO",MessageBoxButtons.OK);
}
return internalForces;
}
Thanks in advance
Solved! Go to Solution.