public static void CmdDrawMember(vdDocument doc) { //doc.Palette.Background = System.Drawing.Color.White; //doc.Palette.Forground = System.Drawing.Color.Black; doc.Redraw(true); JointCoordinateCollection jntCol; using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "Text Files|*.txt"; if (ofd.ShowDialog() != DialogResult.Cancel) { MessageBox.Show(ofd.FileName); jntCol = new JointCoordinateCollection(ofd.FileName); } } //MessageBox.Show("Undert Construction"); }
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, ""); } }
public List <int> Get_Continuous_Members(MemberIncidence b1, ref JointCoordinateCollection cont_jcc) { //JointCoordinateCollection cont_jcc = new JointCoordinateCollection(); MemberIncidenceCollection mbr_coll = new MemberIncidenceCollection(); if (b1 == null) { return(new List <int>()); } List <MemberIncidence> list = new List <MemberIncidence>(); JointCoordinateCollection jcc = new JointCoordinateCollection(); jcc.Add(b1.StartNode); jcc.Add(b1.EndNode); MemberIncidenceCollection mic1 = new MemberIncidenceCollection(); MemberIncidenceCollection mic2 = new MemberIncidenceCollection(); //MemberIncidenceCollection mic3 = new MemberIncidenceCollection(); MemberIncidenceCollection mic4 = new MemberIncidenceCollection(); foreach (var item in AST_DOC.Members) { if (item.EndNode.NodeNo == jcc[0].NodeNo || item.StartNode.NodeNo == jcc[0].NodeNo) { mic1.Add(item); } if (item.EndNode.NodeNo == jcc[1].NodeNo || item.StartNode.NodeNo == jcc[1].NodeNo) { mic2.Add(item); } } //if (jcc[0].NodeNo < jcc[1].NodeNo) //{ // if (!cont_jcc.Contains(jcc[1])) // { // cont_jcc.Add(jcc[1]); // } //} cont_jcc.Add(jcc[0]); cont_jcc.Add(jcc[1]); int flag = 0; mbr_coll.Add(b1); while (flag <= 1) { for (int i = 0; i < AST_DOC.Members.Count; i++) { foreach (var item in AST_DOC.Members) { if (b1.Direction == item.Direction) { if (item.StartNode.NodeNo == cont_jcc[cont_jcc.Count - 1].NodeNo) { if (!cont_jcc.Contains(item.EndNode)) { mbr_coll.Add(item); cont_jcc.Add(item.EndNode); i = 0; break; } } if (item.EndNode.NodeNo == cont_jcc[cont_jcc.Count - 1].NodeNo) { if (!cont_jcc.Contains(item.StartNode)) { mbr_coll.Add(item); cont_jcc.Add(item.StartNode); i = 0; break; } } } } } if (mbr_coll.Count == 1) { cont_jcc.Clear(); cont_jcc.Add(jcc[1]); cont_jcc.Add(jcc[0]); } else { break; } flag++; } List <int> mls = new List <int>(); foreach (var item in mbr_coll) { mls.Add(item.MemberNo); } return(mls); }
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; //} }
private void btn_jload_add_Click(object sender, EventArgs e) { string kStr = "SC "; double dval = 0.0; dval = MyStrings.StringToDouble(txt_sc.Text, 0.0); if (dval != 0.0) { kStr = kStr + dval.ToString("f3"); } if (rbtn_fx_positive.Checked) { kStr = kStr + " FX "; } if (false) { #region CC List <double> list_x = new List <double>(); List <double> list_y = new List <double>(); List <double> list_z = new List <double>(); int i = 0; foreach (var item in iACad.AstraDocument.Joints) { if (!list_x.Contains(item.X)) { list_x.Add(item.X); } if (!list_y.Contains(item.Y)) { list_y.Add(item.Y); } if (!list_z.Contains(item.Z)) { list_z.Add(item.Z); } } list_x.Sort(); list_y.Sort(); list_z.Sort(); i = 0; System.Collections.Hashtable hash_XY = new System.Collections.Hashtable(); System.Collections.Hashtable hash_XZ = new System.Collections.Hashtable(); System.Collections.Hashtable hash_YX = new System.Collections.Hashtable(); System.Collections.Hashtable hash_YZ = new System.Collections.Hashtable(); System.Collections.Hashtable hash_ZX = new System.Collections.Hashtable(); System.Collections.Hashtable hash_ZY = new System.Collections.Hashtable(); //List<double> coords1 = new List<double>(); //List<double> coords2 = new List<double>(); JointCoordinateCollection coords1 = new JointCoordinateCollection(); JointCoordinateCollection coords2 = new JointCoordinateCollection(); foreach (var x in list_x) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.X == x) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_XY.Add(x, coords1); hash_XZ.Add(x, coords2); } foreach (var y in list_y) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.Y == y) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_YX.Add(y, coords1); hash_YZ.Add(y, coords2); } hash_ZX = new System.Collections.Hashtable(); hash_ZY = new System.Collections.Hashtable(); foreach (var z in list_z) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.Z == z) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_ZX.Add(z, coords1); hash_ZY.Add(z, coords2); } #endregion CC } Seismic_Calculations ss = new Seismic_Calculations(iACad); ss.Set_AS(); List <double> forces = ss.Get_All_Forces(); List <double> latforces = ss.Get_Latetal_Forces(); double W = 0.0; foreach (var item in forces) { W += item; } double Fs = 0.0; foreach (var item in latforces) { Fs += item; } double Vb = W * dval; List <double> lst_Q = new List <double>(); foreach (var item in latforces) { lst_Q.Add(item * Vb / Fs); } //List<int> ll = ss.Get_FX_Joints(false); //ll = ss.Get_FX_Joints(true); //ll = ss.Get_FZ_Joints(false); //ll = ss.Get_FZ_Joints(true); for (int i = 1; i < ss.list_y.Count; i++) { var jntLst = ss.Get_Floor_Joints(ss.list_y[i]); foreach (var item in jntLst) { if (rbtn_fz_positive.Checked) { kStr = item + " FZ " + (lst_Q[i - 1] / jntLst.Count).ToString("f3"); } else if (rbtn_fz_negative.Checked) { kStr = item + " FZ -" + (lst_Q[i - 1] / jntLst.Count).ToString("f3"); } else if (rbtn_fx_positive.Checked) { kStr = item + " FX " + (lst_Q[i - 1] / jntLst.Count).ToString("f3"); } else if (rbtn_fx_negative.Checked) { kStr = item + " FX -" + (lst_Q[i - 1] / jntLst.Count).ToString("f3"); } ASTRA_Data.Add(kStr); } } //if (rbtn_fz_positive.Checked) //{ // kStr = kStr + " FZ "; //} ASTRA_Data.Add(kStr); if (Node != null) { if (btn_add.Text == "Change") { //Node = Node.Parent; //Node.Parent.Nodes.Clear(); Node.Text = "JOINT LOAD"; //var nd = Node.Nodes.Add("JOINT LOAD"); foreach (var item in ASTRA_Data) { Node.Nodes.Add(item); } //nd.Nodes.Add( this.Close(); } else { //Node.Text = "JOINT LOAD"; var nd = Node.Nodes.Add("JOINT LOAD"); foreach (var item in ASTRA_Data) { nd.Nodes.Add(item); } //Node.Nodes.Add(kStr); //Node.Expand(); Node.ExpandAll(); } } //else //{ this.Close(); //} }
public void Set_AS() { int i = 0; list_x.Clear(); list_y.Clear(); list_z.Clear(); hash_XY.Clear(); hash_XZ.Clear(); hash_YX.Clear(); hash_YZ.Clear(); hash_ZX.Clear(); hash_ZY.Clear(); foreach (var item in iACad.AstraDocument.Joints) { if (!list_x.Contains(item.X)) { list_x.Add(item.X); } if (!list_y.Contains(item.Y)) { list_y.Add(item.Y); } if (!list_z.Contains(item.Z)) { list_z.Add(item.Z); } } list_x.Sort(); list_y.Sort(); list_z.Sort(); i = 0; JointCoordinateCollection coords1 = new JointCoordinateCollection(); JointCoordinateCollection coords2 = new JointCoordinateCollection(); foreach (var x in list_x) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.X == x) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_XY.Add(x, coords1); hash_XZ.Add(x, coords2); } foreach (var y in list_y) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.Y == y) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_YX.Add(y, coords1); hash_YZ.Add(y, coords2); } hash_ZX = new Hashtable(); hash_ZY = new Hashtable(); foreach (var z in list_z) { coords1 = new JointCoordinateCollection(); coords2 = new JointCoordinateCollection(); foreach (var item in iACad.AstraDocument.Joints) { if (item.Z == z) { if (!coords1.Contains(item)) { coords1.Add(item); } if (!coords2.Contains(item)) { coords2.Add(item); } } } hash_ZX.Add(z, coords1); hash_ZY.Add(z, coords2); } }
private void btn_OK_Click(object sender, EventArgs e) { MyStrings ml = new MyStrings(txt_beam_nos.Text.Trim(), ','); if (ml.Count > 0) { Slab_des.Beam_Nos = ml.StringList[0].Trim(); } else { MessageBox.Show("Slab Members is not defined.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //Slab_des.Beam_Nos = txt_beam_nos.Text; Slab_des.case_index = cmb_slab_type.SelectedIndex; Slab_des.D = MyStrings.StringToDouble(txt_slab_D.Text, 0.0); Slab_des.fck = MyStrings.StringToDouble(cmb_slab_fck.Text.Replace("M", ""), 0.0); Slab_des.gamma = MyStrings.StringToDouble(txt_slab_gamma.Text, 0.0); Slab_des.fy = MyStrings.StringToDouble(cmb_slab_fy.Text.Replace("Fe", ""), 0.0); Slab_des.wll = MyStrings.StringToDouble(txt_slab_wll.Text, 0.0); Slab_des.d1 = MyStrings.StringToDouble(txt_slab_d1.Text, 0.0); Slab_des.s1 = MyStrings.StringToDouble(txt_slab_s1.Text, 0.0); Slab_des.d2 = MyStrings.StringToDouble(txt_slab_d2.Text, 0.0); Slab_des.s2 = MyStrings.StringToDouble(txt_slab_s2.Text, 0.0); Slab_des.d3 = MyStrings.StringToDouble(txt_slab_d3.Text, 0.0); Slab_des.s3 = MyStrings.StringToDouble(txt_slab_s3.Text, 0.0); Slab_des.d4 = MyStrings.StringToDouble(txt_slab_d4.Text, 0.0); Slab_des.s4 = MyStrings.StringToDouble(txt_slab_s4.Text, 0.0); Slab_des.cover = MyStrings.StringToDouble(txt_slab_c.Text, 0.0); Slab_des.dlf = MyStrings.StringToDouble(txt_slab_DLF.Text, 0.0); Slab_des.llf = MyStrings.StringToDouble(txt_slab_LLF.Text, 0.0); Slab_des.dgv_dls = dgv_dls; #region Check Beam Members MyStrings mlist = new MyStrings(txt_beam_nos.Text.Trim(), ' '); MemberIncidenceCollection mic = new MemberIncidenceCollection(); for (int i = 0; i < mlist.Count; i++) { mic.Add(AST_DOC.Members.Get_Member(mlist.GetInt(i))); } JointCoordinateCollection jntc = new JointCoordinateCollection(); for (int i = 1; i < mic.Count; i++) { if (mic[i - 1].StartNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].EndNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].StartNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else if (mic[i - 1].EndNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else { //string ss = Slab_Data[beam_nos] as string; //if (ss != null) // Slab_Data.Remove(beam_nos); //Save_Data(); MessageBox.Show("Beam " + mic[i].MemberNo + " and Beam " + mic[i - 1].MemberNo + " Joints are mismatch..", "ASTRA", MessageBoxButtons.OK); return; } } #endregion Check Beam Members //Chiranjit [2015 04 26] //Slab_des.Calculate_Program(); Slab_des.Design_Program(); List <string> Design_Summary = new List <string>(); Design_Summary.Add(string.Format("-------------------------------------")); Design_Summary.Add(string.Format("SLAB MEMBERS = {0}", Slab_des.Beam_Nos)); Design_Summary.Add(string.Format("SLAB FLOOR LEVEL = {0} M", cmb_flr_lvl.Text)); Design_Summary.AddRange(Slab_des.Design_Summary.ToArray()); Design_Summary.Add(string.Format("-------------------------------------")); string fnm = Slab_des.Get_Design_Summary_File(Slab_des.Beam_Nos, cmb_flr_lvl.Text); //fnm = Path.Combine(Path.GetDirectoryName(fnm), "SLAB_DESIGN_SUMMARY.TXT"); //if (File.Exists(fnm)) // Design_Summary.AddRange(File.ReadAllLines(fnm)); File.WriteAllLines(fnm, Design_Summary.ToArray()); Save_Data(); //Fill_Slab(txt_beam_nos.Text, Slab_des.IS_DESIGN_OK); Fill_All_Slab(); Add_Slab_Boq(Slab_des.BOQ); GetGripSelection(false).RemoveAll(); if (File.Exists(Slab_des.Report_File)) { MessageBox.Show(this, "Report file created in file " + Slab_des.Report_File, "ASTRA", MessageBoxButtons.OK); frmASTRAReport.OpenReport(Slab_des.Report_File, this, false); } VDoc.Redraw(true); //this.DialogResult = DialogResult.OK; //this.Close(); }
private void Get_Beams() { double d = MyStrings.StringToDouble(cmb_flr_lvl.Text, 0.0); VDoc.ActiveLayOut.Entities.RemoveAll(); panel1.Visible = true; MemberIncidenceCollection mic = new MemberIncidenceCollection(); JointCoordinateCollection jcc = new JointCoordinateCollection(); MemberIncidence mi; foreach (var item in AST_DOC.Members) { if (item.StartNode.Y == d && item.EndNode.Y == d) { //mi = new MemberIncidence(); //mi.StartNode = new JointCoordinate(item.StartNode); //mi.EndNode = new JointCoordinate(item.EndNode); //mi.MemberNo = item.MemberNo; //mi.StartNode.Y = mi.StartNode.Z; //mi.EndNode.Y = mi.EndNode.Z; AST_DOC.Members.DrawMember(item, VDoc, TXT_SIZE); //AST_DOC.Members.DrawMember(mi, VDoc, TXT_SIZE); mic.Add(item); if (!jcc.Contains(item.StartNode)) { jcc.Add(item.StartNode); } if (!jcc.Contains(item.EndNode)) { jcc.Add(item.EndNode); } } } jcc.DrawJointsText(VDoc, TXT_SIZE); VDoc.Layers.FindName("Members").Lock = true; VDoc.Layers.FindName("Nodes").Lock = true; //VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VTop(VDoc); Set_TextSize(); //Get_Slabs(mic); Fill_All_Slab(); Load_Slab_Data(); VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_VBack(VDoc); VectorDraw.Professional.ActionUtilities.vdCommandAction.View3D_Vrot(VDoc); }
private void Fill_Slab(string beam_nos, bool isOk) { MyStrings mlist = new MyStrings(beam_nos.Trim(), ' '); MemberIncidenceCollection mic = new MemberIncidenceCollection(); for (int i = 0; i < mlist.Count; i++) { mic.Add(AST_DOC.Members.Get_Member(mlist.GetInt(i))); } JointCoordinateCollection jntc = new JointCoordinateCollection(); vdPolyline vdpl = new vdPolyline(); vdpl.SetUnRegisterDocument(VDoc); vdpl.setDocumentDefaults(); for (int i = 1; i < mic.Count; i++) { if (mic[i - 1].StartNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].EndNode == mic[i].StartNode) { if (!jntc.Contains(mic[i].StartNode)) { jntc.Add(mic[i].StartNode); } } else if (mic[i - 1].StartNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else if (mic[i - 1].EndNode == mic[i].EndNode) { if (!jntc.Contains(mic[i].EndNode)) { jntc.Add(mic[i].EndNode); } } else { //string ss = Slab_Data[beam_nos] as string; //if (ss != null) // Slab_Data.Remove(beam_nos); //Save_Data(); MessageBox.Show("Beam " + mic[i].MemberNo + " and Beam " + mic[i - 1].MemberNo + " Joints are mismatch..", "ASTRA", MessageBoxButtons.OK); return; } } if (!jntc.Contains(mic[0].StartNode)) { jntc.Add(mic[0].StartNode); } if (!jntc.Contains(mic[0].EndNode)) { jntc.Add(mic[0].EndNode); } jntc.Add(jntc[0]); double max_z = AST_DOC.Joints.Max_Z_Positive; foreach (var item in jntc) { //vdpl.VertexList.Add(item.Point); vdpl.VertexList.Add(new gPoint(item.X, max_z - item.Z)); } //if (File.Exists(Slab_des.Get_Report_File(beam_nos, cmb_flr_lvl.Text))) //{ // vdpl.ToolTip = File.ReadAllText(Slab_des.Get_Report_File(beam_nos, cmb_flr_lvl.Text)); // vdpl.ToolTip = " //} vdpl.ToolTip = "Member surrounded : " + beam_nos; vdLayer vlay = VDoc.Layers.FindName("slab"); if (vlay == null) { vlay = new vdLayer(VDoc, "slab"); vlay.SetUnRegisterDocument(VDoc); vlay.setDocumentDefaults(); VDoc.Layers.Add(vlay); } //vlay.Frozen = false; //vlay.Lock = true; vdpl.Layer = vlay; //vdpl.PenColor = new vdColor(Color.DarkGray); if (isOk) { vdpl.PenColor = new vdColor(Color.Green); } else { vdpl.PenColor = new vdColor(Color.Red); } vdpl.HatchProperties = new vdHatchProperties(VectorDraw.Professional.Constants.VdConstFill.VdFillModeHatchFDiagonal); //vdpl.ExtrusionVector = new Vector(0.0, 1.0, 0.0); VDoc.ActiveLayOut.Entities.Add(vdpl); VDoc.ActiveLayOut.Entities.ChangeOrder(vdpl, true); VDoc.Redraw(true); }