想要利用objdbx技术实现文字的查找和替换,然后运行到这边的时候错了,求帮助啊,拜托
Private Sub ReplaceTextInDwg(ByVal strDwgName As String, ByVal strFind As String, ByVal strReplace As String)'ReplaceTextInDwg函数用于打开指定的图形,用objdbx技术来完成文字的查找和替换
objDBX.Open strDwgName
Dim ent As AcadEntity
For Each ent In objDBX.ModelSpace
If TypeOf ent Is AcadText Or TypeOf ent Is AcadMText Then
With ent
If InStr(.TextStrig, strFind) Then .TextString = ReplaceStr(.TextString, strFind, strReplace, False)
End With
End If
Next ent
objDBX.SaveAs strDwgName
End Sub
断点调试,看此时ent是什么对象
页:
[1]