我在CAD上画一个DBTEXT对象
代码如下
Using (doc.LockDocument)
Using trans As Transaction = db.TransactionManager.StartTransaction
Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForRead)
Dim btr As BlockTableRecord = trans.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
mtxtTitle.TextString = "sssss"
mtxtTitle.Position = pt0
btr.AppendEntity(mtxtTitle)
trans.AddNewlyCreatedDBObject(mtxtTitle, True)
trans.Commit()
End Using
End Using