- 积分
- 549
- 明经币
- 个
- 注册时间
- 2014-5-23
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
我用.net的方法读取块里的属性
Private Function DbxGetBlocksData(btr As BlockTableRecord, doc As Document) As Dictionary(Of String, String)
Dim dic As New Dictionary(Of String, String)
Dim db As Database = doc.Database
Using trans As Transaction = db.TransactionManager.StartTransaction
For Each obj_id As ObjectId In btr
Dim ent As Entity = trans.GetObject(obj_id, OpenMode.ForRead)
If ent.GetType.Name = "AttributeDefinition" Then
Dim adf As AttributeDefinition = ent
dic.Add(adf.Tag, adf.TextString)
daf.Tag可以获取属性名称,但是daf.TextString的值始终是"",请问一下是为什么?
End If
Next
End Using
Return dic
End Function
|
|