Exemple #1
0
        private void GetForces()
        {
            try
            {
                ErrorMessage = "";
                FrameDataExtractor       mde    = new FrameDataExtractor();
                FrameEnvelopeForceResult result = mde.GetFrameForces(SelectedGroup, SelectedCombo, "kip_in");
                V_major_max = result.ShearMajorMax;
                V_major_min = result.ShearMajorMin;
                M_major_max = result.MomentMajorMax;
                M_major_min = result.MomentMajorMin;
                P_max       = result.AxialForceMax;
                P_min       = result.AxialForceMin;

                V_minor_max = result.ShearMinorMax;
                V_minor_min = result.ShearMinorMin;
                M_minor_max = result.MomentMinorMax;
                M_minor_min = result.MomentMinorMin;


                P_abs       = Math.Max(Math.Abs(P_max), Math.Abs(P_min));
                M_major_abs = Math.Max(Math.Abs(M_major_max), Math.Abs(M_major_min));
                M_minor_abs = Math.Max(Math.Abs(M_minor_max), Math.Abs(M_minor_min));

                V_major_abs = Math.Max(Math.Abs(V_major_max), Math.Abs(V_major_min));
                V_minor_abs = Math.Max(Math.Abs(V_minor_max), Math.Abs(V_minor_min));
            }
            catch (Exception)
            {
                SetDefaultParameters();
                ErrorMessage = "Data extraction failed. Either ETABS is not running, or results are unavailable for selected Group/Combo.";
            }
        }
Exemple #2
0
        public FrameEnvelopeForceResult GetSelectedFrameForces(string SelectedCombo, string UnitSystem, bool SpecifyStation, double StationRatio)
        {
            FrameEnvelopeForceResult result = null;

            ModelUnits units;
            bool       IsValidUnit = Enum.TryParse(UnitSystem, out units);

            if (IsValidUnit == true)
            {
                //Get selected frames

                SelectionManager sm = new SelectionManager(ETABSModel);
                List <string>    selectedFrameNames = sm.GetSelectedFrameNames();


                //Use frame extractor to get frame forces
                FrameForceExtractor ext = new FrameForceExtractor(ETABSModel);
                if (SpecifyStation == false)
                {
                    result = ext.GetFrameForces(selectedFrameNames, SelectedCombo, units);
                }
                else
                {
                    result = ext.GetFrameForcesAtStationRatio(selectedFrameNames, SelectedCombo, units, StationRatio);
                }
            }
            else
            {
                throw new Exception("Invalid Unit System");
            }
            return(result);
        }
        private void GetForces()
        {
            try
            {
                ErrorMessage = "";
                FrameDataExtractor mde = new FrameDataExtractor();
                //bool SpecifyStation, double StationRatio

                FrameEnvelopeForceResult result = mde.GetSelectedFrameForces(SelectedCombo, "kip_in", SpecifyStation, StationRatio);


                V_major_max = result.ShearMajorMax;
                V_major_min = result.ShearMajorMin;
                M_major_max = result.MomentMajorMax;
                M_major_min = result.MomentMajorMin;
                P_max       = result.AxialForceMax;
                P_min       = result.AxialForceMin;
                V_minor_max = result.ShearMinorMax;
                V_minor_min = result.ShearMinorMin;
                M_minor_max = result.MomentMinorMax;
                M_minor_min = result.MomentMinorMin;
            }
            catch (Exception)
            {
                //SetDefaultParameters();
                ErrorMessage = "Data extraction failed. Either ETABS is not running, or results are unavailable for selected Combo.";
            }
        }
Exemple #4
0
        public FrameEnvelopeForceResult GetFrameForces(string GroupName, string ComboName, string UnitSystem)
        {
            FrameEnvelopeForceResult result = null;


            ModelUnits units;
            bool       IsValidUnit = Enum.TryParse(UnitSystem, out units);

            if (IsValidUnit == true)
            {
                //Get selected frames

                SelectionManager sm = new SelectionManager(ETABSModel);

                //Use frame extractor to get frame forces
                FrameForceExtractor ext = new FrameForceExtractor(ETABSModel);
                result = ext.GetFrameForces(GroupName, ComboName, units);
            }
            else
            {
                throw new Exception("Invalid Unit System");
            }
            return(result);
        }