如题,请大家给予指点,深表感谢
Sub GetArea()
Dim sjx As AcadSelectionSet, obj As AcadEntity
On Error Resume Next
ThisDrawing.SendCommand "_pline" & vbCr
Set sjx = ThisDrawing.SelectionSets.Add("ff1")
sjx.Select acSelectionSetLast
Set obj = sjx.Item(0)
MsgBox obj.Area / 1000000
sjx.Delete
End Sub