- Sub SelectText()
- On Error Resume Next
- Dim adTextobj As AcadEntity
- Do
- ThisDrawing.Utility.GetEntity adTextobj, 0, "请选择原文字:"
- If Err Then
- Debug.Print ThisDrawing.GetVariable("lastprompt")
- If InStr(ThisDrawing.GetVariable("lastprompt"), "*取消*") <> 0 Then
- Exit Sub
- End If
- Else
- If adTextobj.ObjectName = "AcDbText" Or _
- adTextobj.ObjectName = "AcDbMText" Then
- Exit Do
- End If
- End If
- Loop
- End Sub
|