AmesimKnowledge

Working with the Modelica Editor

Find and Replace

Find and replace

search

Find and replace options

search options You can use the Find

Modelica editor Find Find and Replace function to locate text in the Text Editor, and optionally to replace the text located with new text.

When you click the Find/Replace icon , use Ctrl+F or Edit

Find/Replace, the following dialog box opens:

Figure 39: Find/Replace dialog box

To locate a text string, enter one or more words in the Find field. When you click Find, the first incidence of the requested string is displayed (if found). Clicking Find again displays any subsequent occurrences of the requested string, until you reach the end of the file, and String not found is displayed at the bottom of the dialog box:

If you click Find once more, the search starts again from the top of the file.

Options

  • Whole words only Find and replace whole words only search whole words only Whole words only : If you select this option, the search will only return instances of complete words located in the text. For example, the search string part will locate both part and partial unless you select the Whole words only option, in which case it will return only instances of partial.

  • Case sensitive Case sensitive Find and replace case sensitive Search case sensitive : If you select this option, searches will be case sensitive, and only text strings precisely matching the search terms are returned.

  • Use regular expressions Find and replace use regular expressions regular expressions Search use regular expressions Use regular expressions : You can use regular expressions in searches. Regular expressions in the Modelica Editor are QT-based. For more information on regular expressions, please consult the QT project site at the following hyper-link: QRegExp Class Reference.

  • Wrap search Find and replace wrap search Search wrap search Wrap search : When this option is selected, searches automatically restart at the top of the document if you continue to click Find. A message is displayed to indicate that the search has passed the end of the document:

  • Incremental Find and replace incremental search Incremental search Search incremental search : When this option is selected, the search is activated as soon as you start entering a search string. The first occurrence of whatever letters you enter is highlighted, and as you add more letters in the Find field, the search automatically updates to display the first matching occurrence (unless there is no match). This means you do not need to press the Find button to locate a search string.

  • Forward Find and replace forward and backward Forward and backward Search forward and backward and Backward: You can use these options to define whether the search is performed forwards from the current location in the file, or backwards from the current location.

  • Find and replace search in selection Search in selection Search in Selection option: You can use this option to highlight a section of text (with the mouse) and search only in that selection.

  • Replace Find and replace replace and replace all Replace and Replace All Search replace and replace all and Replace All: You can use this option to replace either the first occurrence of the search term located, or all instances of the search term.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Modelica_Editor/xid923577 · retrieved 2026-07-17