프로젝트

일반

사용자정보

개정판 3cc356dc

ID3cc356dc98401c84268ef3a715a0e1537e55579d
상위 c991deec
하위 8d68d2da

조봉훈이(가) 약 2년 전에 추가함

Dump AttributeDefinition Data

Change-Id: I54b884ed1f0ece8c29ad4d17f9c298e3332ffea2

차이점 보기:

DTI_PID/OdReadExMgd/OdReadExMgd.cs
333 333
        }
334 334

  
335 335
        /************************************************************************/
336
        /* Dump AttributeDefinition Data                                                         */
336
        /* Dump AttributeDefinition Data                                         */
337 337
        /************************************************************************/
338
        void dump(AttributeDefinition pAttDef, int indent)
338
        void dump(AttributeDefinition pAttDef, int indent, XmlNode node)
339 339
        {
340
            writeLine(indent, "Field Length", pAttDef.FieldLength);
341
            writeLine(indent, "Invisible", pAttDef.Invisible);
342
            writeLine(indent, "Locked in Position", pAttDef.LockPositionInBlock);
340
            if (node == null) return;
341

  
342
            XmlNode AttributeDefinitionNode = Program.xml.CreateElement(pAttDef.GetRXClass().Name);
343

  
344
            XmlAttribute HandleAttr = Program.xml.CreateAttribute("Handle");
345
            HandleAttr.Value = pAttDef.Handle.ToString();
346
            AttributeDefinitionNode.Attributes.SetNamedItem(HandleAttr);
347

  
348
            XmlAttribute XAttr = Program.xml.CreateAttribute("X");
349
            XAttr.Value = pAttDef.Position.X.ToString();
350
            AttributeDefinitionNode.Attributes.SetNamedItem(XAttr);
351

  
352
            XmlAttribute YAttr = Program.xml.CreateAttribute("Y");
353
            YAttr.Value = pAttDef.Position.Y.ToString();
354
            AttributeDefinitionNode.Attributes.SetNamedItem(YAttr);
355

  
356
            XmlAttribute ZAttr = Program.xml.CreateAttribute("Z");
357
            ZAttr.Value = pAttDef.Position.Z.ToString();
358
            AttributeDefinitionNode.Attributes.SetNamedItem(ZAttr);
359

  
360
            XmlAttribute AngleAttr = Program.xml.CreateAttribute("Angle");
361
            AngleAttr.Value = pAttDef.Rotation.ToString();
362
            AttributeDefinitionNode.Attributes.SetNamedItem(AngleAttr);
363

  
364
            XmlAttribute NormalAttr = Program.xml.CreateAttribute("Normal");
365
            NormalAttr.Value = pAttDef.Normal.ToString();
366
            AttributeDefinitionNode.Attributes.SetNamedItem(NormalAttr);
367

  
368
            XmlAttribute NameAttr = Program.xml.CreateAttribute("Name");
369
            NameAttr.Value = pAttDef.Tag;
370
            AttributeDefinitionNode.Attributes.SetNamedItem(NameAttr);
343 371

  
344 372
            using (var text = new DBText())
345 373
            {
......
354 382
                text.TextString = !string.IsNullOrWhiteSpace(pAttDef.TextString.Replace("*", "")) ? pAttDef.TextString : pAttDef.Tag;
355 383
                if (pAttDef.Justify != AttachmentPoint.BaseLeft)
356 384
                    text.AlignmentPoint = pAttDef.AlignmentPoint;
357
                dumpTextData(text, indent, Program.xml.DocumentElement);
385
                dumpTextData(text, indent, AttributeDefinitionNode);
358 386
            }
359 387
        }
360 388
        /************************************************************************/
......
4008 4036
                            dump((Xline)pEnt, indent);
4009 4037
                            break;
4010 4038
                        case "AcDbAttributeDefinition":
4011
                            dump((AttributeDefinition)pEnt, indent);
4012
                            break;                                
4039
                            dump((AttributeDefinition)pEnt, indent, node);
4040
                            break; 
4013 4041
                        case "AcDbPdfReference":
4014 4042
                        case "AcDbDwfReference":
4015 4043
                        case "AcDbDgnReference":

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)