Example #1
0
        /// <summary>
        /// 获取属性值
        /// </summary>
        public static int GetAttrIntegerValue(this Snap.NX.NXObject nxObject, string title)
        {
            int result = 0;

            int.TryParse(nxObject.GetAttrValue(title), out result);
            return(result);
        }
Example #2
0
        public static double GetAttrRealValue(this Snap.NX.NXObject nxObject, string title)
        {
            double result = 0.00;

            double.TryParse(nxObject.GetAttrValue(title), out result);
            return(result);
        }
Example #3
0
 /// <summary>
 /// 匹配属性值
 /// </summary>
 public static bool MatchAttrValue(this Snap.NX.NXObject obj, string title, object value)
 {
     return(value.ToString() == obj.GetAttrValue(title));
 }