Esempio n. 1
0
        static bool CATCHMENT_UG(vdDocument vdoc)
        {
            string file_name = Path.Combine(Application.StartupPath, "CatchmentAreaVolume_user_guide.txt");

            if (!File.Exists(file_name))
            {
                file_name = Path.Combine(Application.StartupPath, @"AstraHelp\CatchmentAreaVolume_user_guide.txt");
            }
            frmASTRAReport frm = new frmASTRAReport(file_name);

            frm.Text          = "Catchment Area/Volume User's Guide";
            frm.Owner         = thisFrm;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.Show();
            return(false);
        }
Esempio n. 2
0
        private void dgv_beams_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int step = e.RowIndex + 1;

            if (beamDes.Report_File != "")
            {
                string tmp_file = Path.Combine(Path.GetDirectoryName(beamDes.Report_File), "temp");
                //if (!Directory.Exists(tmp_file))
                //    Directory.CreateDirectory(tmp_file);
                //tmp_file = Path.Combine(tmp_file, "B" + step + ".tmp");
                tmp_file = Path.Combine(tmp_file, "B" + step + ".tmp");

                if (File.Exists(tmp_file))
                {
                    frmASTRAReport fap = new frmASTRAReport(tmp_file);
                    fap.Owner = this;
                    fap.ShowDialog();
                }
            }
        }
Esempio n. 3
0
        public void RunThread()
        {
            List <string> list = new List <string>();

            #region TechSOFT Banner
            list.Add("");
            list.Add("");
            list.Add("\t\t**********************************************");
            list.Add("\t\t*          ASTRA Pro Release 18.0            *");
            list.Add("\t\t*      TechSOFT Engineering Services         *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t*           DESIGN OF RCC COLUMN             *");
            list.Add("\t\t*                                            *");
            list.Add("\t\t**********************************************");
            list.Add("\t\t----------------------------------------------");
            list.Add("\t\tTHIS RESULT CREATED ON " + System.DateTime.Now.ToString("dd.MM.yyyy  AT HH:mm:ss") + " ");
            list.Add("\t\t----------------------------------------------");
            list.Add("");

            #endregion



            int c    = 0;
            int step = 1;


            string ColumnNos = "";

            Design_Summary = new List <string>();
            //int c = 0;
            for (int i = 0; i < dgv_columns.RowCount; i++)
            {
                try
                {
                    c = 0;
                    //ColumnData cd = new ColumnData();
                    //SteelColumnDesign cd = new SteelColumnDesign(iApp);
                    SteelColumnDesign cd = col_design;


                    //cd.IsSelect = (bool)dgv_columns[c++, i].Value;
                    bool IsSelect = (bool)dgv_columns[c++, i].Value;
                    if (IsSelect)
                    {
                        var    item = MyList.Get_Array_Intiger(dgv_columns[2, i].Value.ToString());
                        double l    = 0.0;

                        //foreach (var mn in item)
                        //{
                        //    var mi = AST_DOC.Members.Get_Member(mn);
                        //    l += mi.Length;
                        //}

                        Set_Grid_Color(i);

                        foreach (var mn in item)
                        {
                            var mi = AST_DOC.Members.Get_Member(mn);
                            l += mi.Length;
                        }

                        #region User Input

                        //cd.AST_DOC = AST_DOC;

                        //if (AST_DOC_ORG != null)
                        //    cd.AST_DOC = AST_DOC_ORG;
                        //else
                        //    cd.AST_DOC = AST_DOC;

                        //cd.l = MyList.StringToDouble(txt_steel_column_l.Text, 0.0);
                        cd.ColumnNo = dgv_columns[1, i].Value.ToString();
                        cd.l        = l;
                        cd.a        = MyList.StringToDouble(txt_steel_column_a.Text, 0.0);


                        //Pu = StructureAnalysis.GetJoint_R1_Axial(item);
                        //Mux = StructureAnalysis.GetJoint_M2_Bending(all_jnt[i]);
                        //Mux = StructureAnalysis.GetJoint_ShearForce(all_jnt[i]);
                        //Muy = StructureAnalysis.GetJoint_M3_Bending(all_jnt[i]);

                        //cd.P = StructureAnalysis.GetJoint_R1_Axial(item);
                        //cd.M = StructureAnalysis.GetJoint_M3_Bending(item);
                        //cd.V = StructureAnalysis.GetJoint_ShearForce(item);


                        cd.P = MyList.StringToDouble(dgv_columns[8, i].Value.ToString(), 0.0);
                        cd.M = MyList.StringToDouble(dgv_columns[9, i].Value.ToString(), 0.0);
                        cd.V = MyList.StringToDouble(dgv_columns[10, i].Value.ToString(), 0.0);


                        cd.e   = MyList.StringToDouble(txt_steel_column_e.Text, 0.0);
                        cd.Pms = MyList.StringToDouble(txt_steel_column_Pms.Text, 0.0);
                        cd.fy  = MyList.StringToDouble(txt_steel_column_fy.Text, 0.0);
                        cd.fs  = MyList.StringToDouble(txt_steel_column_fs.Text, 0.0);
                        cd.fb  = MyList.StringToDouble(txt_steel_column_fb.Text, 0.0);
                        cd.Pcs = MyList.StringToDouble(txt_steel_column_Pcs.Text, 0.0);
                        cd.Ps  = MyList.StringToDouble(txt_steel_column_Ps.Text, 0.0);
                        cd.n   = MyList.StringToDouble(txt_steel_column_n.Text, 0.0);
                        cd.tb  = MyList.StringToDouble(txt_steel_column_tb.Text, 0.0);
                        cd.Dr  = MyList.StringToDouble(txt_steel_column_Dr.Text, 0.0);
                        cd.Nr  = MyList.StringToDouble(txt_steel_column_Nr.Text, 0.0);


                        cd.Section_Name = dgv_columns[3, i].Value.ToString();

                        var dta = uC_SteelSections1.Get_BeamSection(cd.Section_Name);

                        //cd.A = MyList.StringToDouble(uC_SteelSections1.txt_a.Text, 0.0);
                        //cd.h = MyList.StringToDouble(uC_SteelSections1.txt_h.Text, 0.0);
                        //cd.Bf = MyList.StringToDouble(uC_SteelSections1.txt_Bf.Text, 0.0);
                        //cd.tw = MyList.StringToDouble(uC_SteelSections1.txt_tw.Text, 0.0);
                        //cd.Ixx = MyList.StringToDouble(uC_SteelSections1.txt_Ixx.Text, 0.0);
                        //cd.Iyy = MyList.StringToDouble(uC_SteelSections1.txt_Iyy.Text, 0.0);
                        //cd.rxx = MyList.StringToDouble(uC_SteelSections1.txt_rxx.Text, 0.0);
                        //cd.ryy = MyList.StringToDouble(uC_SteelSections1.txt_ryy.Text, 0.0);



                        cd.A   = dta.Area * 100;
                        cd.h   = dta.Depth;
                        cd.Bf  = dta.FlangeWidth;
                        cd.tw  = dta.WebThickness;
                        cd.Ixx = dta.Ixx * 10000;
                        cd.Iyy = dta.Iyy * 10000;
                        cd.rxx = dta.Rxx * 10;
                        cd.ryy = dta.Ryy * 10;



                        //txt_a.Text = (dta.Area * 100).ToString();

                        ////txt_h.Text = dta.Depth.ToString("f3");
                        //txt_h.Text = dta.Depth.ToString();
                        ////txt_h1.Text = dta.h.ToString("f3");

                        //txt_Ixx.Text = (dta.Ixx * 10000).ToString();
                        //txt_Iyy.Text = (dta.Iyy * 10000).ToString();
                        //txt_rxx.Text = (dta.Rxx * 10).ToString();
                        //txt_ryy.Text = (dta.Ryy * 10).ToString();

                        //txt_Z.Text = (dta.Zxx * 1000).ToString();
                        //txt_tw.Text = dta.WebThickness.ToString();
                        ////txt_tw.Text = dta..ToString("f3");

                        //txt_w.Text = (dta.Weight / 9.81).ToString("f3");
                        //txt_Bf.Text = (dta.FlangeWidth).ToString();

                        //if (lst.Count > 20)
                        //{
                        //    txt_h1.Text = lst[17].ToString();
                        //    txt_h2.Text = lst[18].ToString();
                        //}


                        #endregion User Input

                        //cd.Report_File = ;


                        //string rep_file = Path.Combine(Path.GetDirectoryName(AST_DOC.AnalysisFileName), "Structure Design");

                        //if (!Directory.Exists(rep_file))
                        //    Directory.CreateDirectory(rep_file);

                        //rep_file = Path.Combine(rep_file, "Column Design");

                        //if (!Directory.Exists(rep_file))
                        //    Directory.CreateDirectory(rep_file);

                        ////rep_file = Path.Combine(rep_file, "Column_Design_Report.txt");
                        //rep_file = Path.Combine(rep_file, "Column_" +dgv_columns[1, i].Value.ToString() + ".txt");

                        //cd.Report_File = rep_file;

                        cd.Calculate_Program();


                        if (Design_Summary == null)
                        {
                            Design_Summary = new List <string>();
                        }

                        Design_Summary.Add(string.Format(""));


                        list.Add(string.Format("------------------------------------------------"));
                        list.Add(string.Format("COLUMN = {0}", cd.ColumnNo));
                        list.Add(string.Format("CONTINUOUS MEMBERS = {0}", dgv_columns[2, i].Value.ToString()));
                        list.Add(string.Format("------------------------------------------------"));

                        list.AddRange(cd.Design_Individual_Program().ToArray());

                        //Design_Summary.Add(string.Format("------------------------------------------------"));
                        //Design_Summary.Add(string.Format("COLUMN = {0}", cd.ColumnNos));
                        //Design_Summary.Add(string.Format("CONTINUOUS MEMBERS = {0}", cd.Continuous_ColumnMembers));
                        //Design_Summary.AddRange(col_design.Design_Summary.ToArray());
                        //Design_Summary.Add(string.Format("------------------------------------------------"));


                        Set_Grid_Color(i, true, cd.IS_DESIGN_OK);

                        dgv_columns[11, i].Value = cd.IS_DESIGN_OK ? " OK " : "NOT OK";

                        //Add_Column_BOQ(col_design.BOQ);
                    }
                }
                catch (Exception exx) { }
            }



            #region End of Report
            list.Add("");
            list.Add("---------------------------------------------------------------------------");
            list.Add("---------------------       END OF REPORT        --------------------------");
            list.Add("---------------------------------------------------------------------------");
            #endregion End of Report

            Save_Data();

            File.WriteAllLines(col_design.Report_File, list.ToArray());


            string des_sum = Path.Combine(Path.GetDirectoryName(col_design.Get_Report_File()), "COLUMN_DESIGN_SUMMARY.TXT");
            File.WriteAllLines(des_sum, Design_Summary.ToArray());



            MessageBox.Show(this, "Report file created in file " + col_design.Report_File);

            frmASTRAReport fap = new frmASTRAReport(col_design.Report_File);
            fap.Owner = this;
            fap.ShowDialog();
        }