本帖最后由 作者 于 2005-10-6 8:09:15 编辑
On Error Resume Next Dim n As Integer Dim textold As String, textnew As String Dim Enttype As Variant Dim Endata As Variant textold = "MetalclipsLONG" textnew = "sss" On Error Resume Next For n = 0 To ThisDrawing.ModelSpace.Count - 1 'If ThisDrawing.ModelSpace(n).EntityType = acText Then ThisDrawing.ModelSpace(n).GetXData "", 0, Enttype If Enttype = "text" Then ThisDrawing.ModelSpace(n).GetXData "", 1, Endata If Endata = textold Then ThisDrawing.ModelSpace(n).SetXData 1, textnew End If End If Next On Error Resume Next |