프로젝트

일반

사용자정보

개정판 2e409996

ID2e409996232c378da262f104012f254f51691c0a
상위 7a8645c9
하위 b4189669, a03f7b94

gaqhf 이(가) 약 5년 전에 추가함

dev issue #1229 : remove multiline method

Change-Id: I6fda290848116c7c009b440cfd38fd6037b63075

차이점 보기:

DTI_PID/APIDConverter/AutoModeling.cs
502 502
                acTrans.Commit();
503 503
            }
504 504
        }
505
        private void DrawMultiLineText(double x, double y, double width, string text)
506
        {
507
            // Get the current document and database
508
            Autodesk.AutoCAD.ApplicationServices.Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
509
            Database acCurDb = acDoc.Database;
510

  
511
            // Start a transaction
512
            using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
513
            {
514
                // Open the Block table for read
515
                BlockTable acBlkTbl;
516
                acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId,
517
                                                OpenMode.ForRead) as BlockTable;
518

  
519
                // Open the Block table record Model space for write
520
                BlockTableRecord acBlkTblRec;
521
                acBlkTblRec = acTrans.GetObject(acBlkTbl[BlockTableRecord.ModelSpace],
522
                                                OpenMode.ForWrite) as BlockTableRecord;
523

  
524
                // Create a multiline text object
525
                using (MText acMText = new MText())
526
                {
527
                    acMText.Location = new Point3d(x, y, 0);
528
                    acMText.Width = width;
529
                    acMText.Contents = text;
530

  
531
                    acBlkTblRec.AppendEntity(acMText);
532
                    acTrans.AddNewlyCreatedDBObject(acMText, true);
533
                }
534

  
535
                // Save the changes and dispose of the transaction
536
                acTrans.Commit();
537
            }
538
        }
539 505
        #endregion
540 506

  
541 507
        #region Autocad Utils

내보내기 Unified diff

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