Ejemplo n.º 1
0
        private static IFCElementAssemblyType GetPredefinedTypeFromObjectType(string objectType)
        {
            if (String.IsNullOrEmpty(objectType))
            {
                return(IFCElementAssemblyType.NotDefined);
            }

            foreach (IFCElementAssemblyType val in Enum.GetValues(typeof(IFCElementAssemblyType)))
            {
                if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(objectType, val.ToString()))
                {
                    return(val);
                }
            }

            return(IFCElementAssemblyType.UserDefined);
        }
Ejemplo n.º 2
0
        private static IFCReinforcingBarRole GetReinforcingBarRole(string role)
        {
            if (String.IsNullOrWhiteSpace(role))
            {
                return(IFCReinforcingBarRole.NotDefined);
            }

            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Main"))
            {
                return(IFCReinforcingBarRole.Main);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Shear"))
            {
                return(IFCReinforcingBarRole.Shear);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Ligature"))
            {
                return(IFCReinforcingBarRole.Ligature);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Stud"))
            {
                return(IFCReinforcingBarRole.Stud);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Punching"))
            {
                return(IFCReinforcingBarRole.Punching);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Edge"))
            {
                return(IFCReinforcingBarRole.Edge);
            }
            if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(role, "Ring"))
            {
                return(IFCReinforcingBarRole.Ring);
            }
            return(IFCReinforcingBarRole.UserDefined);
        }