public LoadGenerationData() { LoadType = new MLoadData(); X = Y = Z = XINC = 0.0; }
public static List <MLoadData> GetLiveLoads(string file_path) { if (!File.Exists(file_path)) { return(null); } //TYPE1 IRCCLASSA //68 68 68 68 114 114 114 27 //3.00 3.00 3.00 4.30 1.20 3.20 1.10 //1.80 List <MLoadData> LL_list = new List <MLoadData>(); List <string> file_content = new List <string>(File.ReadAllLines(file_path)); MyList mlist = null; string kStr = ""; int icount = 0; for (int i = 0; i < file_content.Count; i++) { kStr = MyList.RemoveAllSpaces(file_content[i]); //kStr = MyList.RemoveAllSpaces(file_content[i].Trim().TrimStart().TrimEnd()); kStr = kStr.Replace(' ', ','); kStr = kStr.Replace(',', ' '); kStr = MyList.RemoveAllSpaces(kStr); mlist = new MyList(kStr, ' '); if (mlist.StringList[0].Contains("TYPE")) { MLoadData ld = new MLoadData(); if (mlist.Count == 2) { kStr = mlist.StringList[0].Replace("TYPE", ""); ld.TypeNoText = "TYPE " + kStr; ld.Code = mlist.StringList[1]; LL_list.Add(ld); } else if (mlist.Count == 3) { ld.TypeNoText = "TYPE " + mlist.StringList[1]; ld.Code = mlist.StringList[2]; LL_list.Add(ld); } if ((i + 3) < file_content.Count) { ld.LoadWidth = MyList.StringToDouble(file_content[i + 3], 0.0); } try { ld.LoadValues = new MyList(file_content[i + 1], ' '); ld.Distances = new MyList(file_content[i + 2], ' '); } catch (Exception) { } } } return(LL_list); //TYPE 2 IRCCLASSB //20.5 20.5 20.5 20.5 34.0 34.0 8.0 8.0 //3.00 3.00 3.00 4.30 1.20 3.20 1.10 //1.80 //TYPE 3 IRC70RTRACK //70 70 70 70 70 70 70 70 70 70 //0.457 0.457 0.457 0.457 0.457 0.457 0.457 0.457 0.457 //0.84 //TYPE 4 IRC70RWHEEL //85 85 85 85 60 60 40 //1.37 3.05 1.37 2.13 1.52 3.96 //0.450 1.480 0.450 //TYPE 5 IRCCLASSAATRACK //70 70 70 70 70 70 70 70 70 70 //0.360 0.360 0.360 0.360 0.360 0.360 0.360 0.360 0.360 //0.85 //TYPE 6 IRC24RTRACK //62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 62.5 //0.366 0.366 0.366 0.366 0.366 0.366 0.366 0.366 0.366 //0.36 }