Private Function MToS(mtext As Variant) As Variant '炸开MText并返回一个Text数组 Dim i As Integer Dim ss As AcadSelectionSet Dim pTexts As New Collection ThisDrawing.ActiveSelectionSet.Clear ThisDrawing.SendCommand "Explode" & vbCr & "(handent " & Chr(34) _ & mtext.Handle & Chr(34) & ")" & vbCr & vbCr Set ss = ThisDrawing.ActiveSelectionSet For i = 0 To ss.Count - 1 If UCase(ss(i).ObjectName) = "ACDBTEXT" Then pTexts.Add ss(i) Next i MToS = pTexts End Function