private List <LoadCombination> ReadLoadCombination(List <string> ids = null) { // Linear Load Combinations !! Only !! // only solver generated combinations List <LoadCombination> loadCombinations = new List <LoadCombination>(); int err = 0; int uID = 1; int freedomCase = 1; int loadComboCount = 0; List <Loadcase> allLoadCases = ReadLoadcase(); err = St7.St7GetNumLSACombinations(uID, ref loadComboCount); if (!St7ErrorCustom(err, "Could not get loadCombinations")) { return(loadCombinations); } for (int ldCombo = 1; ldCombo <= loadComboCount; ldCombo++) { StringBuilder loadComboName = new StringBuilder(St7.kMaxStrLen); err = St7.St7GetLSACombinationName(uID, ldCombo, loadComboName, St7.kMaxStrLen); if (!St7ErrorCustom(err, "Could not get a name of load combination " + ldCombo)) { continue; } List <double> loadCaseFactors = new List <double>(); for (int j = 0; j < allLoadCases.Count; j++) { int loadcaseNum = GetAdapterId <int>(allLoadCases[j]); double factor = 0; err = St7.St7GetLSACombinationFactor(uID, St7.ltLoadCase, ldCombo, loadcaseNum, freedomCase, ref factor); if (!St7ErrorCustom(err, "Could not get a factor for a loadcase " + loadcaseNum + " load combo " + ldCombo)) { return(loadCombinations); } loadCaseFactors.Add(factor); } LoadCombination loadCombination = BH.Engine.Structure.Create.LoadCombination(loadComboName.ToString(), ldCombo, allLoadCases, loadCaseFactors); SetAdapterId(loadCombination, ldCombo); loadCombinations.Add(loadCombination); } return(loadCombinations); }