2012년 3월 8일 목요일

Access a Collection


// Get the current document and start the Transaction Manager
//현재 문서를 가져와서 트랜잭션 관리자를 시작합니다
Database acCurDb = Application.DocumentManager.MdiActiveDocument.Database;
using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
{
    // This example returns the layer table for the current database
    LayerTable acLyrTbl;
    acLyrTbl = acTrans.GetObject(acCurDb.LayerTableId,
                                 OpenMode.ForRead) as LayerTable;

     // Dispose of the transaction
}


출처
http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer%27s%20Guide/index.html

댓글 없음 :

댓글 쓰기