- <CommandMethod("T6")> Public Sub T6()
- Dim db As Database = HostApplicationServices.WorkingDatabase
- Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
- Using trans As Transaction = db.TransactionManager.StartTransaction
- Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForRead)
- Dim btr As BlockTableRecord = trans.GetObject(bt.Item(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
- For Each Id As ObjectId In btr
- Dim obj As DBObject = trans.GetObject(Id, OpenMode.ForWrite)
- If TypeOf (obj) Is Entity Then
- ed.WriteMessage(vbCrLf & obj.GetType.ToString)
- End If
- Next
- End Using
- End Sub
|