GeometryGym.Ifc.IfcQuantityArea.Parse C# (CSharp) Méthode

Parse() static private méthode

static private Parse ( string str, ReleaseVersion schema ) : IfcQuantityArea
str string
schema ReleaseVersion
Résultat IfcQuantityArea
        internal static IfcQuantityArea Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityArea q = new IfcQuantityArea();
            int pos = 0, len = str.Length;
            q.Parse(str, ref pos, len);
            string s = ParserSTEP.StripField(str, ref pos, len);
            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out q.mAreaValue))
            {
                if (s.StartsWith("IFCAREAMEASURE"))
                {
                    s = s.Substring(15, s.Length - 16);
                    double.TryParse(s, out q.mAreaValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
                q.mFormula =  ParserSTEP.StripString(str, ref pos, len);
            return q;
        }

Usage Example

Exemple #1
0
        internal static IfcQuantityArea Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityArea q = new IfcQuantityArea();
            int             pos = 0, len = str.Length;

            q.Parse(str, ref pos, len);
            string s = ParserSTEP.StripField(str, ref pos, len);

            if (!double.TryParse(s, System.Globalization.NumberStyles.Any, ParserSTEP.NumberFormat, out q.mAreaValue))
            {
                if (s.StartsWith("IFCAREAMEASURE"))
                {
                    s = s.Substring(15, s.Length - 16);
                    double.TryParse(s, out q.mAreaValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
            return(q);
        }
All Usage Examples Of GeometryGym.Ifc.IfcQuantityArea::Parse