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

Parse() static private méthode

static private Parse ( string str, ReleaseVersion schema ) : IfcQuantityLength
str string
schema ReleaseVersion
Résultat IfcQuantityLength
        internal static IfcQuantityLength Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityLength q = new IfcQuantityLength();
            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.mLengthValue))
            {
                if (s.StartsWith("IFCLENGTHMEASURE"))
                {
                    s = s.Substring(17, s.Length - 18);
                    double.TryParse(s, out q.mLengthValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            return q;
        }

Usage Example

Exemple #1
0
        internal static IfcQuantityLength Parse(string str, ReleaseVersion schema)
        {
            IfcQuantityLength q = new IfcQuantityLength();
            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.mLengthValue))
            {
                if (s.StartsWith("IFCLENGTHMEASURE"))
                {
                    s = s.Substring(17, s.Length - 18);
                    double.TryParse(s, out q.mLengthValue);
                }
            }
            if (schema != ReleaseVersion.IFC2x3)
            {
                q.mFormula = ParserSTEP.StripString(str, ref pos, len);
            }
            return(q);
        }
All Usage Examples Of GeometryGym.Ifc.IfcQuantityLength::Parse