Esempio n. 1
0
        internal static void AddXrecordToDocument(string dictionaryName, string xKey, string text)
        {
            ResultBuffer resbuf = new ResultBuffer(new TypedValue((int)DxfCode.Text, text));

            using (XRecordHandler xh = new XRecordHandler(Active.Document))
            {
                xh.UpdateDocumentXrecord(dictionaryName, xKey, resbuf);
            }
        }
Esempio n. 2
0
        internal static void DisplayEntityXrecord(ObjectId id, string key)
        {
            string[]     xValue;
            ResultBuffer resbuf;

            using (var xh = new XRecordHandler())
            {
                resbuf = xh.GetEntityXrecord(id, key);
            }

            TypedValue[] typedValues = resbuf.AsArray();
            xValue = new string[typedValues.Length];

            for (int i = 0; i < typedValues.Length; i++)
            {
                Active.WriteMessage(typedValues[i].Value.ToString());
            }
        }
Esempio n. 3
0
        internal static void DisplayDocumentXrecord(string dictionaryName, string xKey)
        {
            string[]     xValue;
            ResultBuffer resbuf;

            using (XRecordHandler xh = new XRecordHandler(Active.Document))
            {
                resbuf = xh.GetXrecord(dictionaryName, xKey);
            }

            if (resbuf == null)
            {
                Active.WriteMessage("No Xrecord '{0}' found in dictionary: {1}", xKey, dictionaryName);
                return;
            }

            TypedValue[] typed_values = resbuf.AsArray();
            xValue = new string[typed_values.Length];

            for (int i = 0; i < typed_values.Length; i++)
            {
                Active.WriteMessage(typed_values[i].Value.ToString());
            }
        }