Beispiel #1
0
 public CmdCalculation(Analysis analysis, Design design)
 {
     this.Analysis = analysis;
     this.Design   = design;
 }
Beispiel #2
0
        public bool RunDesign(string mode, string struxmlPath, Analysis analysis, Design design, List <string> bscPath, string docxTemplatePath, bool endSession, bool closeOpenWindows)
        {
            FdScript fdScript = FdScript.Design(mode, struxmlPath, analysis, design, bscPath, docxTemplatePath, endSession);

            return(this.RunFdScript(fdScript, closeOpenWindows, endSession, false));
        }
Beispiel #3
0
        /// <summary>
        /// Create fdscript to run analysis and design.
        /// </summary>
        public static FdScript Design(string mode, string struxmlPath, Analysis analysis, Design design, List <string> bscPath, string docxTemplatePath, bool endSession)
        {
            CmdUserModule _mode = CmdUserModule.RCDESIGN;

            switch (mode)
            {
            case "rc":
            case "Rc":
            case "RC":
            case "RCDESIGN":
                _mode = CmdUserModule.RCDESIGN;
                break;

            case "steel":
            case "Steel":
            case "STEEL":
            case "STEELDESIGN":
                _mode = CmdUserModule.STEELDESIGN;
                break;

            case "timber":
            case "Timber":
            case "TIMBER":
            case "TIMBERDESIGN":
                _mode = CmdUserModule.TIMBERDESIGN;
                break;

            default:
                throw new ArgumentException("Mode is not supported. Mode should be rc, steel or timber");
            }

            FdScript fdScript = FdScript.CalculateStruxml(struxmlPath, _mode, bscPath, docxTemplatePath, endSession);

            fdScript.CmdCalculation = new CmdCalculation(analysis, design);
            return(fdScript);
        }