Beispiel #1
0
        public void SetFact()
        {
            NodeData.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, NodeData.LengthUnit);
            NodeData.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, NodeData.MassUnit);

            SecPropArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, SecPropArr.LengthUnit);
            SecPropArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, SecPropArr.MassUnit);

            MatPropArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MatPropArr.LengthUnit);
            MatPropArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MatPropArr.MassUnit);

            JointNodalLoadArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, JointNodalLoadArr.LengthUnit);
            JointNodalLoadArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, JointNodalLoadArr.MassUnit);

            MebrBmLoadArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MebrBmLoadArr.LengthUnit);
            MebrBmLoadArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MebrBmLoadArr.MassUnit);

            MatPropArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MatPropArr.LengthUnit);
            MatPropArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MatPropArr.MassUnit);

            //MemberTrussArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MemberTrussArr.LengthUnit);
            //MemberTrussArr.MassFactor = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MemberTrussArr.MassUnit);

            MatPropInfoArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MatPropInfoArr.LengthUnit);
            MatPropInfoArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MatPropInfoArr.MassUnit);

            ElementDataArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, ElementDataArr.LengthUnit);
            ElementDataArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, ElementDataArr.MassUnit);

            MatPropInfoArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, MatPropInfoArr.LengthUnit);
            MatPropInfoArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, MatPropInfoArr.MassUnit);

            AreaLoadArr.LengthFactor = CAstraUnits.GetLengthFact(BasicInfo.LengthUnit, AreaLoadArr.LengthUnit);
            AreaLoadArr.MassFactor   = CAstraUnits.GetMassFact(BasicInfo.MassUnit, AreaLoadArr.MassUnit);
        }
Beispiel #2
0
        private void SetUnit()
        {
            if ((this.app.AppDocument.wunit_flag == 0 && this.app.AppDocument.lunit_flag == 0) ||
                ((this.app.AppDocument.MUnit == cmbMassUnit.Text && this.app.AppDocument.LUnit == cmbLengthUnit.Text)))
            {
                this.app.AppDocument.MUnit = cmbMassUnit.Text;
                this.app.AppDocument.LUnit = cmbLengthUnit.Text;

                short fl = this.app.AppDocument.wunit_flag;
                this.app.AppDocument.WFact      = CAstraUnits.GetMassFact(cmbMassUnit.Text, ref fl);
                this.app.AppDocument.wunit_flag = fl;
                fl = this.app.AppDocument.lunit_flag;
                this.app.AppDocument.LFact      = CAstraUnits.GetLengthFact(cmbLengthUnit.Text, ref fl);
                this.app.AppDocument.lunit_flag = fl;

                this.app.AppDocument.NodeData.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.NodeData.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.MatPropertyInfo.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.MatPropertyInfo.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.AreaLoad.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.AreaLoad.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.JointNodalLoad.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.JointNodalLoad.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.MemberBeamLoad.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.MemberBeamLoad.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.MaterialProperty.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.MaterialProperty.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.SectionProperty.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.SectionProperty.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);

                this.app.AppDocument.BeamConnectivity.LengthFactor = CAstraUnits.GetFact(this.app.AppDocument.LUnit);
                this.app.AppDocument.BeamConnectivity.MassFactor   = CAstraUnits.GetFact(this.app.AppDocument.MUnit);
            }
            else if (!(this.app.AppDocument.MUnit == cmbMassUnit.Text && this.app.AppDocument.LUnit == cmbLengthUnit.Text))
            {
                MessageBox.Show(this, "You can't change the unit, unit has already taken.\n" +
                                "\n       Length Unit = " + this.app.AppDocument.LUnit + ", Mass Unit = " + this.app.AppDocument.MUnit, "ASTRA pro", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }