Beispiel #1
0
        /// <summary>
        /// Initialise a new load combination with the ID specified
        /// </summary>
        /// <param name="LoadCombinationID">The ID of the load combination to initialise</param>
        /// <returns></returns>
        LoadCombination GetLoadCombination(int LoadCombinationID)
        {
            string          title;
            int             loadCasesCount;
            LoadCombination newLoadCombination;
            dynamic         loadCases;
            dynamic         loadCaseFactors;

            // Set the title
            title = this.StaadWrapper.Load.GetLoadCaseTitle(LoadCombinationID).ToString();

            //Get load cases
            loadCasesCount  = (int)this.StaadWrapper.Load.GetNoOfLoadAndFactorPairsForCombination(LoadCombinationID);
            loadCases       = new int[loadCasesCount];
            loadCaseFactors = new double[loadCasesCount];
            this.StaadWrapper.Load.GetLoadAndFactorForCombination(LoadCombinationID, ref loadCases, ref loadCaseFactors);

            newLoadCombination       = new LoadCombination(LoadCombinationID);
            newLoadCombination.Title = title;
            for (int i = 0; i < loadCasesCount; i++)
            {
                newLoadCombination.LoadCaseAndFactorPairs.Add(this.LoadCases.Single(lc => lc.Id == loadCases[i]), loadCaseFactors[i]);
            }

            return(newLoadCombination);
        }
Beispiel #2
0
        public bool Equals(LoadCombination n)
        {
            if ((object)n == null)
            {
                return(false);
            }

            return(this.Id == n.Id);
        }
Beispiel #3
0
        public bool Equals(LoadCombination n)
        {
            if ((object)n == null)
                return false;

            return this.ID == n.ID;
        }
Beispiel #4
0
        /// <summary>
        /// Initialise a new load combination with the ID specified
        /// </summary>
        /// <param name="LoadCombinationID">The ID of the load combination to initialise</param>
        /// <returns></returns>
        private LoadCombination GetLoadCombination(int LoadCombinationID)
        {
            string title;
            int loadCasesCount;
            LoadCombination newLoadCombination;
            dynamic loadCases;
            dynamic loadCaseFactors;

            // Set the title
            title = this.Staad.Load.GetLoadCaseTitle(LoadCombinationID).ToString();

            //Get load cases
            loadCasesCount = (int)this.Staad.Load.GetNoOfLoadAndFactorPairsForCombination(LoadCombinationID);
            loadCases = new int[loadCasesCount];
            loadCaseFactors = new double[loadCasesCount];
            this.Staad.Load.GetLoadAndFactorForCombination(LoadCombinationID, ref loadCases, ref loadCaseFactors);

            newLoadCombination = new LoadCombination(LoadCombinationID);
            newLoadCombination.Title = title;
            for (int i = 0; i < loadCasesCount; i++)
                newLoadCombination.LoadCaseAndFactorPairs.Add(this.LoadCases.Single(lc => lc.ID == loadCases[i]), loadCaseFactors[i]);

            return newLoadCombination;
        }