如何遍历块属性
Dim db As Database = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.DatabaseDim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
Dim ent As PromptEntityResult = ed.GetEntity("请选择图框块")
'判断是否选择成功
If ent.Status = PromptStatus.OK Then
Using transaction As Transaction = db.TransactionManager.StartTransaction()
'获取选择的实体
Dim entity1 As Entity
entity1 = DirectCast(transaction.GetObject(ent.ObjectId, OpenMode.ForRead, True), Entity)如上代码,选择一个块后,如何实现遍历该块里的所有属性?(需要块中属性名称及属性值)
页:
[1]