Beispiel #1
0
        /// <summary>
        /// Gets window style operation.
        /// </summary>
        /// <param name="familySymbol">
        /// The element type of window.
        /// </param>
        /// <returns>
        /// The IFCWindowStyleOperation.
        /// </returns>
        public static Toolkit.IFCWindowStyleOperation GetIFCWindowStyleOperation(ElementType familySymbol)
        {
            string value;

            ParameterUtil.GetStringValueFromElement(familySymbol, BuiltInParameter.WINDOW_OPERATION_TYPE, out value);

            if (String.IsNullOrEmpty(value))
            {
                return(Toolkit.IFCWindowStyleOperation.NotDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "UserDefined"))
            {
                return(Toolkit.IFCWindowStyleOperation.UserDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "SinglePanel"))
            {
                return(Toolkit.IFCWindowStyleOperation.Single_Panel);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "DoublePanelVertical"))
            {
                return(Toolkit.IFCWindowStyleOperation.Double_Panel_Vertical);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "DoublePanelHorizontal"))
            {
                return(Toolkit.IFCWindowStyleOperation.Double_Panel_Horizontal);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelVertical"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Vertical);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelBottom"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Bottom);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelTop"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Top);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelLeft"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Left);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelRight"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Right);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TriplePanelHorizontal"))
            {
                return(Toolkit.IFCWindowStyleOperation.Triple_Panel_Horizontal);
            }

            return(Toolkit.IFCWindowStyleOperation.NotDefined);
        }
Beispiel #2
0
        /// <summary>
        /// Gets window style construction.
        /// </summary>
        /// <param name="element">
        /// The window element.
        /// </param>
        /// <param name="initialValue">
        /// The initial value.
        /// </param>
        /// <returns>
        /// The string represents the window style construction.
        /// </returns>
        public static IFCWindowStyleConstruction GetIFCWindowStyleConstruction(Element element, string initialValue)
        {
            string value;

            if (!ParameterUtil.GetStringValueFromElementOrSymbol(element, "Construction", out value))
            {
                value = initialValue;
            }

            if (value == "")
            {
                return(IFCWindowStyleConstruction.NotDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Aluminum"))
            {
                return(IFCWindowStyleConstruction.Aluminium);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "HighGradeSteel"))
            {
                return(IFCWindowStyleConstruction.High_Grade_Steel);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Steel"))
            {
                return(IFCWindowStyleConstruction.Steel);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Wood"))
            {
                return(IFCWindowStyleConstruction.Wood);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "AluminumWood"))
            {
                return(IFCWindowStyleConstruction.Aluminium_Wood);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Plastic"))
            {
                return(IFCWindowStyleConstruction.Plastic);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "OtherConstruction"))
            {
                return(IFCWindowStyleConstruction.Other_Construction);
            }

            return(IFCWindowStyleConstruction.NotDefined);
        }
Beispiel #3
0
        /// <summary>
        /// Gets window style construction.
        /// </summary>
        /// <param name="element">The window element.</param>
        /// <returns>The string represents the window style construction.</returns>
        public static IFCWindowStyleConstruction GetIFCWindowStyleConstruction(Element element)
        {
            string value;

            if (ParameterUtil.GetStringValueFromElementOrSymbol(element, "Construction", out value) == null)
            {
                ParameterUtil.GetStringValueFromElementOrSymbol(element, BuiltInParameter.WINDOW_CONSTRUCTION_TYPE, false, out value);
            }

            if (String.IsNullOrWhiteSpace(value))
            {
                return(IFCWindowStyleConstruction.NotDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Aluminum"))
            {
                return(IFCWindowStyleConstruction.Aluminium);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "HighGradeSteel"))
            {
                return(IFCWindowStyleConstruction.High_Grade_Steel);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Steel"))
            {
                return(IFCWindowStyleConstruction.Steel);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Wood"))
            {
                return(IFCWindowStyleConstruction.Wood);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "AluminumWood"))
            {
                return(IFCWindowStyleConstruction.Aluminium_Wood);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Plastic"))
            {
                return(IFCWindowStyleConstruction.Plastic);
            }

            //else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "OtherConstruction"))
            return(IFCWindowStyleConstruction.Other_Construction);
        }
Beispiel #4
0
        /// <summary>
        /// Gets window panel position.
        /// </summary>
        /// <param name="initialValue">
        /// The initial value.
        /// </param>
        /// <param name="element">
        /// The window element.
        /// </param>
        /// <param name="number">
        /// The number of panel position.
        /// </param>
        /// <returns>
        /// The string represents the window panel position.
        /// </returns>
        public static IFCWindowPanelPosition GetIFCWindowPanelPosition(string initialValue, Element element, int number)
        {
            string currPanelName = "PanelPosition" + number.ToString();

            string value;

            if (!ParameterUtil.GetStringValueFromElementOrSymbol(element, currPanelName, out value))
            {
                value = initialValue;
            }

            if (value == "")
            {
                return(IFCWindowPanelPosition.NotDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Left"))
            {
                return(IFCWindowPanelPosition.Left);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Middle"))
            {
                return(IFCWindowPanelPosition.Middle);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Right"))
            {
                return(IFCWindowPanelPosition.Right);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Bottom"))
            {
                return(IFCWindowPanelPosition.Bottom);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "Top"))
            {
                return(IFCWindowPanelPosition.Top);
            }

            return(IFCWindowPanelPosition.NotDefined);
        }
Beispiel #5
0
        /// <summary>
        /// Gets window panel operation.
        /// </summary>
        /// <param name="initialValue">
        /// The initial value.
        /// </param>
        /// <param name="element">
        /// The window element.
        /// </param>
        /// <param name="number">
        /// The number of panel operation.
        /// </param>
        /// <returns>
        /// The string represents the window panel operation.
        /// </returns>
        public static IFCWindowPanelOperation GetIFCWindowPanelOperation(string initialValue, Element element, int number)
        {
            string currPanelName = "PanelOperation" + number.ToString();

            string value;

            if (!ParameterUtil.GetStringValueFromElementOrSymbol(element, currPanelName, out value))
            {
                value = initialValue;
            }

            if (value == "")
            {
                return(IFCWindowPanelOperation.NotDefined);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "SideHungRightHand"))
            {
                return(IFCWindowPanelOperation.SideHungRightHand);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "SideHungLeftHand"))
            {
                return(IFCWindowPanelOperation.SideHungLeftHand);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TiltAndTurnRightHand"))
            {
                return(IFCWindowPanelOperation.TiltAndTurnRightHand);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TiltAndTurnLeftHand"))
            {
                return(IFCWindowPanelOperation.TiltAndTurnLeftHand);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "TopHung"))
            {
                return(IFCWindowPanelOperation.TopHung);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "BottomHung"))
            {
                return(IFCWindowPanelOperation.BottomHung);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "PivotHorizontal"))
            {
                return(IFCWindowPanelOperation.PivotHorizontal);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "PivotVertical"))
            {
                return(IFCWindowPanelOperation.PivotVertical);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "SlidingHorizontal"))
            {
                return(IFCWindowPanelOperation.SlidingHorizontal);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "SlidingVertical"))
            {
                return(IFCWindowPanelOperation.SlidingVertical);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "RemovableCasement"))
            {
                return(IFCWindowPanelOperation.RemovableCasement);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "FixedCasement"))
            {
                return(IFCWindowPanelOperation.FixedCasement);
            }
            else if (NamingUtil.IsEqualIgnoringCaseSpacesAndUnderscores(value, "OtherOperation"))
            {
                return(IFCWindowPanelOperation.OtherOperation);
            }

            return(IFCWindowPanelOperation.NotDefined);
        }