private void cmb_floor_levels_SelectedIndexChanged(object sender, EventArgs e) { List <int> mems = (List <int>)BeamTable[cmb_floor_levels.Text]; if (mems != null) { txt_member_nos.Text = MyStrings.Get_Array_Text(mems); } }
private void rbtn_beam_all_CheckedChanged(object sender, EventArgs e) { RadioButton rbtn = sender as RadioButton; cmb_floor_levels.Enabled = false; if (rbtn.Name == rbtn_beam_all.Name) { List <int> mems = (List <int>)BeamTable["all"]; if (mems != null) { txt_member_nos.Text = MyStrings.Get_Array_Text(mems); } } else if (rbtn.Name == rbtn_beam_floor.Name) { cmb_floor_levels.Enabled = true; cmb_floor_levels.SelectedIndex = -1; cmb_floor_levels.SelectedIndex = 0; } else if (rbtn.Name == rbtn_column_all.Name) { if (AllColumn != null) { txt_member_nos.Text = MyStrings.Get_Array_Text(AllColumn); } } else if (rbtn.Name == rbtn_beam_select.Name) { if (selected_beams != null) { txt_member_nos.Text = MyStrings.Get_Array_Text(selected_beams); } else { txt_member_nos.Text = kStr; } } else if (rbtn.Name == rbtn_column_select.Name) { if (selected_columns != null) { txt_member_nos.Text = MyStrings.Get_Array_Text(selected_columns); } else { txt_member_nos.Text = kStr; } } else if (rbtn.Name == rbtn_member_select.Name) { txt_member_nos.Text = kStr; } }
public void Update_Data(string UpdText) { if (TRV == null) { return; } List <List <int> > list1 = new List <List <int> >(); List <int> mems = new List <int>(); List <int> Updmems = new List <int>(); //string UpdText = "1 TO 10 PR YD 0.410 ZD 0.32"; MyStrings mmls = new MyStrings(UpdText, ' '); int intx = 0; string kStr = ""; string PR = ""; for (intx = 0; intx < mmls.Count; intx++) { if (mmls.StringList[intx].StartsWith("PR")) { kStr = mmls.GetString(0, intx - 1); PR = mmls.GetString(intx); break; } } Updmems = MyStrings.Get_Array_Intiger(kStr); string PR_Upd = PR; for (int i = 0; i < TRV.Nodes.Count; i++) { //mems = MyStrings.Get_Array_Intiger(TRV.Nodes[i].Text); mmls = new MyStrings(TRV.Nodes[i].Text, ' '); intx = 0; kStr = ""; PR = ""; for (intx = 0; intx < mmls.Count; intx++) { if (mmls.StringList[intx].StartsWith("PR")) { kStr = mmls.GetString(0, intx - 1); PR = mmls.GetString(intx); break; } } mems = MyStrings.Get_Array_Intiger(kStr); foreach (var item in Updmems) { if (mems.Contains(item)) { mems.Remove(item); } } if (mems.Count > 0) { TRV.Nodes[i].Text = MyStrings.Get_Array_Text(mems) + " " + PR; } else { TRV.Nodes.RemoveAt(i); i--; } list1.Add(mems); } TRV.Nodes.Add(UpdText); //string kStr = ""; }
private void Select_Members() { dgv_columns.Rows.Clear(); chk_sele_all.Checked = true; List <MemberIncidence> list_mem = new List <MemberIncidence>(); List <int> list_mem1 = new List <int>(); List <List <int> > list_conts = new List <List <int> >(); for (int i = 0; i < AST_DOC.Members.Count; i++) { var item = AST_DOC.Members[i]; if (item.EndNode.X == item.StartNode.X && item.EndNode.Y != item.StartNode.Y && item.EndNode.Z == item.StartNode.Z) { list_mem.Add(item); } } bool flag = false; List <int> lst_jnt = new List <int>(); List <List <int> > all_jnt = new List <List <int> >(); MovingLoadAnalysis.frm_ProgressBar.ON("Reading Members......"); for (int i = 0; i < list_mem.Count; i++) { MovingLoadAnalysis.frm_ProgressBar.SetValue(i, list_mem.Count); flag = false; foreach (var item in list_conts) { if (item.Contains(list_mem[i].MemberNo)) { flag = true; break; } } if (!flag) { JointCoordinateCollection cont_jcc = new JointCoordinateCollection(); list_mem1 = Get_Continuous_Members(list_mem[i], ref cont_jcc); list_conts.Add(list_mem1); lst_jnt = new List <int>(); foreach (var item in cont_jcc) { lst_jnt.Add(item.NodeNo); } all_jnt.Add(lst_jnt); } } MovingLoadAnalysis.frm_ProgressBar.OFF(); MemberIncidence mi = null; double Pu = 0.0; double Mux = 0.0; double Muy = 0.0; for (int i = 0; i < list_conts.Count; i++) { var item = list_conts[i]; mi = AST_DOC.Members.Get_Member(item[0]); //Pu = StructureAnalysis.GetJoint_R1_Axial(all_jnt[i]); //Mux = StructureAnalysis.GetJoint_M2_Bending(all_jnt[i]); //Muy = StructureAnalysis.GetJoint_M3_Bending(all_jnt[i]); Pu = StructureAnalysis.GetJoint_R1_Axial(all_jnt[i]); //Mux = StructureAnalysis.GetJoint_M2_Bending(all_jnt[i]); Mux = StructureAnalysis.GetJoint_ShearForce(all_jnt[i]); Muy = StructureAnalysis.GetJoint_M3_Bending(all_jnt[i]); dgv_columns.Rows.Add(true, "C" + (i + 1), MyStrings.Get_Array_Text(item), col_design.Section_Name, col_design.h, Main_Bar_Dia, col_design.bar_nos, Tie_Bar_Dia, Pu, Mux, Muy, ""); } }
private void Select_Members() { double d = MyStrings.StringToDouble(cmb_flr_lvl.Text, 0.0); dgv_beams.Rows.Clear(); cmb_sele_all.Checked = true; //for (int i = 0; i < AST_DOC.Members.Count; i++) //{ // var item = AST_DOC.Members[i]; // if (item.EndNode.Y == d && item.StartNode.Y == d) // { // dgv_beams.Rows.Add(true, item.MemberNo, "", item.Property.YD, item.Property.ZD); // } //} List <MemberIncidence> list_mem = new List <MemberIncidence>(); List <int> list_mem1 = new List <int>(); List <List <int> > list_conts = new List <List <int> >(); for (int c = 0; c < cmb_flr_lvl.Items.Count; c++) { d = MyStrings.StringToDouble(cmb_flr_lvl.Items[c].ToString(), 0.0); for (int i = 0; i < AST_DOC.Members.Count; i++) { var item = AST_DOC.Members[i]; if (item.EndNode.Y == d && item.StartNode.Y == d) //if (item.EndNode.Y == item.StartNode.Y) { list_mem.Add(item); } } } bool flag = false; MovingLoadAnalysis.frm_ProgressBar.On = false; MovingLoadAnalysis.frm_ProgressBar.ON("Reading continuous Beam Nos........"); MemberIncidence mi = null; int count = 1; double last_Y = 0.0; double am1, am2, am3, am4, av1, av2, av3; am1 = am2 = am3 = am4 = av1 = av2 = av3 = 0.0; JointCoordinateCollection cont_jcc = new JointCoordinateCollection(); int cnt = 1; for (int i = 0; i < list_mem.Count; i++) { MovingLoadAnalysis.frm_ProgressBar.SetValue(i, list_mem.Count); flag = false; foreach (var item in list_conts) { if (item.Contains(list_mem[i].MemberNo)) { flag = true; break; } } if (!flag) { cont_jcc = new JointCoordinateCollection(); list_mem1 = Get_Continuous_Beams(list_mem[i], ref cont_jcc); list_conts.Add(list_mem1); #region var item = list_mem1; mi = AST_DOC.Members.Get_Member(item[0]); if (last_Y != mi.EndNode.Y) { count = 1; } beamDes.Get_All_Forces(cont_jcc, ref am1, ref am2, ref am3, ref am4, ref av1, ref av2, ref av3); dgv_beams.Rows.Add(cnt++, true, mi.EndNode.Y.ToString("f4"), "B" + (count++), MyStrings.Get_Array_Text(item), mi.Property.YD, mi.Property.ZD, d1, d2, d3, d4, //d5, d6, beamDes.Shear_Bar_dia, am1.ToString("f3"), am2.ToString("f3"), am3.ToString("f3"), am4.ToString("f3"), av1.ToString("f3"), av2.ToString("f3"), av3.ToString("f3"), ""); last_Y = mi.EndNode.Y; #endregion } } MovingLoadAnalysis.frm_ProgressBar.OFF(); //MemberIncidence mi = null; //int count = 1; //double last_Y = 0.0; //double am1, am2, am3, am4, av1, av2, av3; //am1 = am2 = am3 = am4 = av1 = av2 = av3 = 0.0; //for (int i = 0; i < list_conts.Count; i++) //{ // var item = list_conts[i]; // mi = AST_DOC.Members.Get_Member(item[0]); // if (last_Y != mi.EndNode.Y) // { // count = 1; // } // dgv_beams.Rows.Add(i+1, true, mi.EndNode.Y.ToString("f3"), "B" + (count++), // MyStrings.Get_Array_Text(item), // mi.Property.YD, mi.Property.ZD, // d1, d2, d3, d4, d5, d6, // beamDes.Shear_Bar_dia, // am1.ToString("f3"), // am2.ToString("f3"), // am3.ToString("f3"), // am4.ToString("f3"), // av1.ToString("f3"), // av2.ToString("f3"), // av3.ToString("f3"), // ""); // last_Y = mi.EndNode.Y; //} }
public void Update_Data(string UpdText) { if (TRV == null) { return; } List <List <int> > list1 = new List <List <int> >(); List <int> mems = new List <int>(); List <int> Updmems = new List <int>(); //string UpdText = "1 TO 10 PR YD 0.410 ZD 0.32"; MyStrings mmls = new MyStrings(UpdText, ' '); int intx = 0; string kStr = ""; string PR = ""; for (intx = 0; intx < mmls.Count; intx++) { if (mmls.StringList[intx].StartsWith("PR")) { kStr = mmls.GetString(0, intx - 1); PR = mmls.GetString(intx); break; } } Updmems = MyStrings.Get_Array_Intiger(kStr); string PR_Upd = PR; //MyStrings memGrp = new MyStrings(UpdText, ' '); string mat_str = kStr.Trim(); for (int i = 0; i < TRV.Nodes.Count; i++) { //mems = MyStrings.Get_Array_Intiger(TRV.Nodes[i].Text); mmls = new MyStrings(TRV.Nodes[i].Text, ' '); if (Updmems.Count > 0) { intx = 0; kStr = ""; PR = ""; for (intx = 0; intx < mmls.Count; intx++) { if (mmls.StringList[intx].StartsWith("PR")) { kStr = mmls.GetString(0, intx - 1); PR = mmls.GetString(intx); break; } } mems = MyStrings.Get_Array_Intiger(kStr); if (mems.Count > 0) { foreach (var item in Updmems) { if (mems.Contains(item)) { mems.Remove(item); } } if (mems.Count > 0) { TRV.Nodes[i].Text = MyStrings.Get_Array_Text(mems) + " " + PR; } else { TRV.Nodes.RemoveAt(i); i--; } list1.Add(mems); } } else { if (mmls.StringList[0] == mat_str) { TRV.Nodes[i].Text = UpdText; //TRV.Nodes.RemoveAt(i); goto _ss; } } } TRV.Nodes.Add(UpdText); _ss: iACad.AstraDocument.MemberProperties.AddTxt(UpdText); iACad.AstraDocument.MemberProperties.CopyMemberIncidence(iACad.AstraDocument.Members); }