The Search column in the Program and Text editor workspaces

Application

In the Search column, you can search files for any character strings, such as individual syntax elements in the NC program. The control lists all the results found.

Description of function

The Search column in the Program workspace

The Search column can be selected in the Program and Text editor workspaces. In the MDI application you search only in the active NC program. The Search and replace mode is not available in the Program Run operating mode.

The control provides the following functions, icons and buttons in the Search column:

Icon or button

Meaning

Search mode:

  • Current program or Current file
  • Search current file

  • Opened programs or Opened files
  • Search all opened files of the same type (e.g., *.h or *.txt)

  • Search and replace
  • Search for strings and replace them with new strings, such as syntax elements

  • Search and replace mode

Programs called

Search all called NC programs of the current NC program

Only in the Current program mode

Match whole words only

If you select the check box, the control only displays exact matches. This means that if you search for Z+10, for example, the control ignores Z+100.

Search for:

In the input area, you define the search term. If you have not yet entered any characters, the control suggests the last six search terms for selection. The search is not case-sensitive.

The control loads the word or syntax element at the current cursor position into the input area. If the selected NC block is not edited, the control accepts the syntax initiator.

Search

Start search

The control shows the following information about the results:

  • File paths
  • Row numbers or NC block numbers
  • Complete row contents
  • Number of results

The control groups the results according to files. If you select a result, the control positions the cursor in the corresponding row.

Search and replace mode

In Search and replace mode, you can search for strings and replace the results found with other strings, such as individual syntax elements.

The control performs a syntax check in the NC programs before replacing a syntax element. With the syntax check, the control ensures that the new content results in correct syntax. If the result produces a syntax error, the control does not replace the content and displays a message.

In Search and replace mode, the control provides the following check boxes and buttons:

Buttons

Meaning

Search backward

The control searches the file from bottom to top.

Wrap around

The control searches the entire file, wrapping around the start and end.

Find next

The control searches the file for the search term. The control marks the next result in the file.

Replace

The control performs a syntax check, if required, and automatically replaces the marked content with the contents of the Replace with: field.

Replace and find next

If a search has not yet been performed, the control only marks the first result.

When a result is highlighted, the control performs a syntax check, if required, and automatically replaces the found content with the contents of the Replace with: field. The control then marks the next result.

Replace all

The control performs a syntax check, if required, and automatically replaces all found results with the contents of the Replace with: field.

Search for and replace syntax elements

To search for and replace syntax elements in the NC program:

    1. Select an operating mode (e.g., Editor)
    2. Select the desired NC program
    3. The control opens the selected NC program in the Program workspace.

    1. Open the Search column

    1. In the Search mode: field, select the Search and replace function
    2. The control displays the Search for: and Replace with: fields.

    1. In the Search for: field, enter the search content (e.g., M4)
    2. In the Replace with: field, enter the desired content (e.g., M3)

    1. Select Find next
    2. The control closes previously called NC programs, if any had been called, and highlights the first result in the main program in purple.

    1. Select Replace
    2. The control performs a syntax check and replaces the content if the check is successful.

    Notes

    • The search results are retained until you shut down the control or search again.
    • If you double-tap or click on a search result in a called NC program, the control opens the NC program (on a new tab if not already open). If the NC program is already open, the control switches to the corresponding tab.
    • If you have not entered a value for Replace with:, the control deletes the search value.