示例#1
0
            /// <summary>
            /// Convertion into ForceType
            /// </summary>
            /// <param name="enabledForce">EnabledForce to be converted</param>
            /// <returns></returns>
            public static Autodesk.Revit.DB.CodeChecking.Engineering.ForceType GetForceType(this EnabledInternalForces enabledForce)
            {
                switch (enabledForce)
                {
                default: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Unknown);

                case EnabledInternalForces.FX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fx);

                case EnabledInternalForces.FY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fy);

                case EnabledInternalForces.FZ: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fz);

                case EnabledInternalForces.MX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Mx);

                case EnabledInternalForces.MY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.My);

                case EnabledInternalForces.MZ: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Mz);
                }
            }
示例#2
0
            /// <structural_toolkit_2015>

            /// <summary>
            ///  Convertion into ForceType
            /// </summary>
            /// <param name="enabledForce">EnabledForce to be converted</param>
            /// <param name="category">Type of element as BuiltInCategory</param>
            /// <returns>Forces type as ForceType</returns>
            public static Autodesk.Revit.DB.CodeChecking.Engineering.ForceType GetForceType(this EnabledInternalForces enabledForce, Autodesk.Revit.DB.BuiltInCategory category = Autodesk.Revit.DB.BuiltInCategory.OST_BeamAnalytical)
            {
                switch (category)
                {
                case Autodesk.Revit.DB.BuiltInCategory.OST_BeamAnalytical:
                case Autodesk.Revit.DB.BuiltInCategory.OST_ColumnAnalytical:
                {
                    switch (enabledForce)
                    {
                    default: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Unknown);

                    case EnabledInternalForces.FX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fx);

                    case EnabledInternalForces.FY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fy);

                    case EnabledInternalForces.FZ: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fz);

                    case EnabledInternalForces.MX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Mx);

                    case EnabledInternalForces.MY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.My);

                    case EnabledInternalForces.MZ: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Mz);
                    }
                }

                case Autodesk.Revit.DB.BuiltInCategory.OST_FloorAnalytical:
                case Autodesk.Revit.DB.BuiltInCategory.OST_FoundationSlabAnalytical:
                case Autodesk.Revit.DB.BuiltInCategory.OST_WallAnalytical:
                {
                    switch (enabledForce)
                    {
                    default: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Unknown);

                    case EnabledInternalForces.FX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fxx);

                    case EnabledInternalForces.FY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Fyy);

                    case EnabledInternalForces.MX: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Mxx);

                    case EnabledInternalForces.MY: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Myy);
                    }
                }

                default: return(Autodesk.Revit.DB.CodeChecking.Engineering.ForceType.Unknown);
                }
            }