Dim objName As String Dim entry As AcadEntity For Each entry In ThisDrawing.ModelSpace objName = entry.ObjectName entry.Highlight (True) MsgBox "The name of this object is " & objName, vbInformation, "ObjectName Example" entry.Highlight (False) Next
Sub aa() Dim objName As String Dim entry As AcadBlockReference For Each entry In ThisDrawing.ModelSpace MsgBox "图层名: " & entry.Layer, vbInformation, "Example" entry.Highlight (False) Next