Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

MicroStation VBA "s_ChangeTextInfo" error

$
0
0

I am running MicroStation V8i SS3 (Version. 08.11.09.459)

We are trying to run a search and replace function on multiple drawings using the following code within an excel file (but we keep getting errors):

(side note, the code was created by someone else who is no longer with the company & I believe they were using an older version of MicroStation)


'FIND & REPLACE METHOD

'START FIND & REPLACE COMMAND

MyMicroStationDGN.CadInputQueue.SendCommand "MDL SILENTLOAD CHNGTXT"

'ENTER VALUE FOR THE FIND DIALOG BOX
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.oldString", FindWhatText, "CHNGTXT"

'ENTER VALUE FOR THE REPLACE DIALOG BOX
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.newString", ReplaceWithText, "CHNGTXT"

'SET FIND & REPLACE CRITERION
'0 = FALSE
'-1 = TRUE
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.matchCase", 0, "CHNGTXT"
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.wholeWords", 0, "CHNGTXT"
'MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.wholeWords", -1, "CHNGTXT"
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.regularExps", 0, "CHNGTXT"
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.cellText", 0, "CHNGTXT"
MyMicroStationDGN.SetCExpressionValue "s_changeTextInfo.fractions", 0, "CHNGTXT"

'EXECUTE FIND & REPLACE COMMAND
MyMicroStationDGN.CadInputQueue.SendCommand "CHNGTXT ALL"

'NOT REQUIRED
'MyMicroStationDGN.CommandState.StartDefaultCommand


The error that keeps coming up is:

 

I read another post reply by Jan Slegr (May 2011) that the find/replace text tool command changed names...  "the older version it is named FINDREPLACETEXT, but in the newer versions it is CHNGTXT."

So I am wondering if there was another name change with this tool or if there is something else that we are missing.

Any help / direction would be appreciated. I can also provide more info if this isn't clear and/or not detailed enough.

Thanks,

April B


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>