>i have record a VBA to find/replace 3 Words but its getting stop every single time it replaces a word. A small windows pops up asking me to "press OK" search completed and every time i need to press OK for next step. please help to use this in correct way
>I have 300 files nearly please help me to use this VBA as batch process so i can replace the text in all files
i have attached a popup window dialog box picture. waiting for someones answer who have the knowledge of VBA if any one could help me now i would be very thankful. i have to submit this files soon
any answer would be appreciated thanks
Sub Macro1()
Dim startPoint As Point3d
Dim point As Point3d, point2 As Point3d
Dim lngTemp As Long
' Coordinates are in master units
startPoint.X = 0.860905733419942
startPoint.Y = 0.283392695373664
startPoint.Z = 0#
' Send a data point to the current command
point.X = startPoint.X
point.Y = startPoint.Y
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
' Start a command
CadInputQueue.SendCommand "MDL LOAD CLIPBRD COPY"
CadInputQueue.SendCommand "MDL KEYIN FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT"
' Send a keyin that can be a command string
CadInputQueue.SendKeyin "FIND DIALOG ZOOMLEVEL 16"
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING DAMMMAM"
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING SCOPE OF WORK & TECHNICAL SSPECIFICATION"
CadInputQueue.SendKeyin "FIND DIALOG REPLACESTRING SCOPE OF WORK & TECHNICAL SPECIFICATION"
CadInputQueue.SendKeyin "CHANGE TEXT FIND"
CadInputQueue.SendKeyin "CHANGE TEXT CHANGE"
point.X = startPoint.X + 2.43219019862252E-02
point.Y = startPoint.Y - 9.29615424449349E-02
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
point.X = startPoint.X + 1.25583135851272E-02
point.Y = startPoint.Y - 0.128082096652338
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
CadInputQueue.SendCommand "MDL LOAD CLIPBRD COPY"
CadInputQueue.SendCommand "MDL KEYIN FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT"
CadInputQueue.SendKeyin "FIND DIALOG ZOOMLEVEL 16"
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING SCOPE OF WORK & TECHNICAL SSPECIFICATION"
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING JAFARI"
CadInputQueue.SendKeyin "FIND DIALOG REPLACESTRING JAAFARI"
CadInputQueue.SendKeyin "CHANGE TEXT FIND"
CadInputQueue.SendKeyin "CHANGE TEXT CHANGE"
point.X = startPoint.X + 0.371685265789714
point.Y = startPoint.Y - 0.424362606539024
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
point.X = startPoint.X - 1.62802247904091E-02
point.Y = startPoint.Y - 0.286172170816244
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
point.X = startPoint.X - 1.62802247904091E-02
point.Y = startPoint.Y - 0.286172170816244
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
Dim modalHandler As New Macro1ModalHandler
AddModalDialogEventsHandler modalHandler
' The following statement opens modal dialog "Edit Tags [SEEDS2TBLK]"
CadInputQueue.SendKeyin "edit tags"
CadInputQueue.SendKeyin "choose element"
point.X = startPoint.X + 0.117175657415151
point.Y = startPoint.Y - 0.301600853589438
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
CadInputQueue.SendKeyin "FIND DIALOG SEARCHSTRING DAMMMAM"
CadInputQueue.SendKeyin "FIND DIALOG REPLACESTRING DAMMAM"
CadInputQueue.SendKeyin "CHANGE TEXT FIND"
point.X = startPoint.X + 0.132222402492848
point.Y = startPoint.Y - 9.11344615902145E-02
point.Z = startPoint.Z
CadInputQueue.SendDataPoint point, 1
CadInputQueue.SendKeyin "CHANGE TEXT FIND"
CadInputQueue.SendKeyin "CHANGE TEXT CHANGE"
RemoveModalDialogEventsHandler modalHandler
CommandState.StartDefaultCommand
End Sub..
![]()