Replacing Texts in Projects

The Movicon "Edit" menu you will find the  "Replace in Project..." command through which you can find and replace texts within the project. The fields in which texts can be searched in can either be variable or text type. When clicking this command, the following dialog window will open:

 

 

The text you wish to search for must be entered in the "Find" field and the text you wish to replace it with must be entered in the "Replace" field.  The text search criteria can be defined in the 'Search Conditions' dialog box section which povide the following options:

 

Search inside Child projects: enable this option if you wish the search to extend to any existing Child projects as well.

Match whole word only: enable this option if you wish the search to match the string specified with the whole string. In this case, if the string specified in the 'Find' field is part of an extended string, it will not be found without enabling this option. For example, when enabling this option to find "Var1" text, it will not be found in  "Var1=1" but in "Var1 = 1".

Match case: when this option is enabled, the text search will become case sensitive and, therefore, will distinguish between lower case from uppercase letters.

 

In addition, you can also define which fields you wish the search to be carried out in:

 

Any Field: the specified string will be searched for and replaced if found in both text and project variable (Tag) fields.

Text Fields: the specified string will be searched for and replaced if found in the project resource text fields only

Tag fields: the string specified will be searched for and replaced if found in project resource variable (Tag) fields only

 

When selecting the "Any field" or "Tag field" option to replace text and the text to be searched for corresponds to a variable (tag) name, this variable will be renamed in the RealTimeDB variable list as well.  

Variables will not be renamed when the "Text Fields" option is selected.  

 

The "Resourse Type" lets you select one or more resource types in which to search and replace specified text if found.   The "Check All" and "Uncheck All" can be used to select or deselect all field options.  They can also be selected individually as desired.  

 

When activating the 'replace' command after Movicon has found the specified text, a dialog window will open to confirm the replacement.  This confirmation window will show the specified text searched for, the text to be replaced and the name of the resource or object where the text was found.  In addition, the "Project Explorer" window will update to show the resource in which the text was found. At this point, the replacement can be confirmed by pressing the "Yes" button or aborted by pressing the "No" button.  When confirming with "Yes to all", the specified text will be replaced in all the resources without recieving confirmation for each resource beforehand.   When pressing the "Cancel" button, the whole replacement operation will be aborted and text replacements not yet processed will not be replaced.  When the replacement operation has terminated, another window will display showing all the replacements that took place.

 

If a project variable (tag), (or part of the name when the "Match whole word only" has not been selected) is replaced, it will result as being renamed in the RealTimeDB variable list showing the old name between brackets at the side.  In this case, you will need to activate the "Apply New Name" command to make the new variable name definite.

 

 

See Also