开始我用扩展字典去读,结果没读出.后来用扩展数据读出来的.... Sub GetAttrib() Dim dataType As Variant Dim data As Variant Dim objCurrent As AcadEntity Dim basepnt As Variant ThisDrawing.Utility.GetEntity objCurrent, basepnt objCurrent.GetXData "", dataType, data If IsEmpty(dataType) Then MsgBox "没有属性", vbCritical Exit Sub End If Dim str1 As String Dim str0 As String Dim i As Integer For i = LBound(dataType) To UBound(dataType) str1 = dataType(i) & "||" & data(i) str0 = str0 + str1 + Chr(13) + Chr(10) Next i MsgBox str0, vbCritical End Sub 先用修改属性选择一下界址线,不然只有4种属性,选择之后什么都不改,关闭之后再读就有68种属性了 |