Replace Variable Names

The Replace option is available in the right-click menu and in the Edit Menu when a variable is selected in PetroVR Econ. When selected, the following window opens:

Replace Econ Variable Names window

This window allows you to replace all or some of the occurrences of a string in FML expressions and in the definition of module inputs (such as results and variables from PetroVR Plan, inputs from Globals, etc.) contained in the current economic model.

The first box (Find and replace all references to) initially contains the full name of the variable selected when the window was opened; this is the string that will be replaced by the text entered under With the following variable name. You can modify this string to select only a part of the variable name, or enter another string, even if it is unrelated to the original variable. Click on the icons on the right of each box to select from lists of existing Global variable Globals or Econ variable Econ variable names.

References: List of all occurrences of the string in FML expression FML expressions and Plan variable variables mapped from Plan. Use this list to select those in which you wish to replace the string. When done, click Apply to perform the replacement and continue working in the same window, or Ok to replace and close the window.

This option does not modify variable names, only references to them. In the example above, the string "Production" will be replaced in the definition of the listed variables, but not e.g. in the name "Volumes: Total Oil Production". To rename variables you should use the Rename command instead, which modifies the variable's name and also all references to it in any FML expressions.

Note also that this option only replaces variable names (or parts thereof), i.e. only text found between pairs of quotation marks ("); functions, operators, constants and other pieces of text outside variable names are not affected. Also, take into account that it replaces the text as entered, and does not automatically expand a variable name to include that of the object it belongs to, so that an instruction of the type 'Replace "AA:BBBB" to "CCCC"' will not create a string "AA:CCCC" and may be a source of confusion.