Quantcast
Channel: Andrew Bell's Activities
Viewing all articles
Browse latest Browse all 4948

Find Replace Text with Batch Process

$
0
0

  
 Applies To 
  
 Product(s):MicroStation
 Version(s):08.11.09.459
 Environment: N/A
 Area: Text
 Subarea: Find / Replace Text
 Original Author:Daniel Koval, Bentley Technical Support Group
  

 

Globally Find and Replace Text in numerous files with the Batch Process Utility

Background

Whether you need to update pieces of text or Tags, using the Batch Processor and the Find/Replace Text tool this can be accomplished.  Also, be sure to note the initial Key In string that contains the word SILENT so that the OK Button does not force you to manually interact with each file being processed.

Steps to Accomplish

Option 1 Batch Process

  1. Using the Batch Process as described in the Help File (Help > Contents > Menus > Utilities > Batch Process
  2. When creating the Command file use these lines:
    MDL SILENTLOAD FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT
    FIND DIALOG SEARCHSTRING old
    FIND DIALOG REPLACESTRING new
    CHANGE TEXT ALLFILTERED

Option 2 Macro

  1. If desired, a Macro can be used
  2. Here is the example from a Community Forum:

    Sub main

       Dim startPoint As MbePoint

       Dim point As MbePoint, point2 As MbePoint

    '   Start a command

       MbeSendCommand "MDL KEYIN FINDREPLACETEXT,CHNGTXT CHANGE DIALOGTEXT"

    '   Send a keyin that can be a command string

       MbeSendKeyin "FIND DIALOG PAN True"

       MbeSendKeyin "FIND DIALOG ZOOM True"

       MbeSendKeyin "FIND DIALOG ZOOMLEVEL 14"

       MbeSendKeyin "FIND DIALOG SEARCHSTRING "

       MbeSendKeyin "FIND DIALOG SEARCHSTRING Whatever Text"

       MbeSendKeyin "FIND DIALOG REPLACESTRING This Text"

       MbeSendKeyin "CHANGE TEXT ALLFILTERED"

    End Sub

 


Viewing all articles
Browse latest Browse all 4948

Trending Articles