Exemplo n.º 1
0
        /// <summary>
        /// Create fdscript to run analysis.
        /// </summary>
        public static FdScript Analysis(string struxmlPath, Analysis analysis, List <string> bscPath, string docxTemplatePath, bool endSession)
        {
            CmdUserModule mode     = CmdUserModule.RESMODE;
            FdScript      fdScript = FdScript.CalculateStruxml(struxmlPath, mode, bscPath, docxTemplatePath, endSession);

            fdScript.CmdCalculation = new CmdCalculation(analysis);
            return(fdScript);
        }
Exemplo n.º 2
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);
        }