예제 #1
0
        /// <summary>
        /// Gets value from 'Geo7.Dictionary.Values' dictionary. If there is no value for 'name' empty string ("") is returned.
        /// </summary>
        public static string GetValue(this AcTransaction trans, string valName)
        {
            Xrecord xRec = trans.GetValueRecord(valName);
            var     val  = xRec.Data.AsArray()[0];

            return(val.Value.ToString());
        }
예제 #2
0
        /// <summary>
        /// Sets value in 'Geo7.Dictionary.Values' dictionary.
        /// </summary>
        public static void SetValue(this AcTransaction trans, string valName, string value)
        {
            var typedVal = new TypedValue((int)DxfCode.Text, value);

            using (var resBuff = new ResultBuffer(typedVal))
            {
                var xRec = trans.GetValueRecord(valName);
                xRec.Data = resBuff;
            }
        }