Topic: DMD0288 Search and Replace |
|
Replace is used to replace or swap one program element with another element, or replace or swap a range of program elements with another range of elements. The search and replace can operate in the current code-block, or a separate code-block, within in a section of a code-block or the entire code-block. The search and replace operation can perform one operation at a time, or can be used to build a table of operations that can be performed in bulk.
Note: Search and Replace will not work in code-blocks that are locked. Refer to the help topic on code-block protection for more information.
The search and replace dialog can be invoked by selecting the Search-> Replace menu selection or pressing Ctrl + R.
Replace / Swap Conditions - define the search options and the replace actions
Replace - select this option to replace all occurrences of the Search Element with the specified replacement element, for example replace X1 with X2
Swap - select this option to swap all occurrences of the Search Element with the specified replacement element, for example swap X1 with X2
With - enter the program element to replace or swap with the Search Element (Press F9 to invoke the Element Browser or the down arrow for auto-complete)
Match Exactly - check this box to force the search operation to match the case of the Search Element
Number of Elements - specifies the number of sequential elements to include in the search and replace operation. As the number of elements increases the Through' fields will be automatically filled in to serve as visual confirmation of which program elements will be affected by the search and replace operation.
Add to List - adds the current search and replace operation to the Replace / Swap List
Update in List - if this button is enabled, the programmer is editing a search and replace entry that is already in the Replace / Swap List, clicking this button will update that entry with the current search and replace operation
Documentation Group - designates what action to take when dealing with program elements that have element documentation (Nickname, Extra Info, Description).
Note: both the Replace/Swap element and With element MUST be documentable to enable the Documentation group.
Where to Replace - designates the code-blocks where the search and replace operations will be performed
Replace / Swap List - when either Add to List or Update in List is clicked in the Replace / Swap Conditions group
to perform multiple search and replace instructions, this list will be
displayed. This list contains the individual search and replace operations
that will be all performed when the Replace! button is clicked.
Delete From List will delete the highlighted entry from the replacement list.
Click the Replace! button to perform the single search and replace operation (or the bulk search and replace operation in the Replace / Swap List)
Click Cancel to exit the dialog without performing the search and replace operation.
|
|
See Also:
|
|