[CommandMethod("TEST", CommandFlags.UsePickSet)]publicvoidTest(){using(TransactionacTrans=ActiveUtil.Document.TransactionManager.StartTransaction()){// Open the Block table for readBlockTableblockTable=acTrans.GetObject(ActiveUtil.Database.BlockTableId,OpenMode.ForRead)asBlockTable;// Open the Block table record Model space for writeBlockTableRecordblockTableRecord=acTrans.GetObject(blockTable[BlockTableRecord.ModelSpace],OpenMode.ForWrite)asBlockTableRecord;// Create a single-line text objectusing(DBTextacText=newDBText()){acText.Position=newPoint3d(2,2,0);acText.Height=0.5;acText.TextString="Hello, World.";blockTableRecord.AppendEntity(acText);acTrans.AddNewlyCreatedDBObject(acText,true);}// Save the changes and dispose of the transactionacTrans.Commit();}}