Using Aliases with Genealogy Variables

Aliases allow you to pass variables in an array to a single Visual Basic calculation by assigning a common alias to the input variables.

If you need to use a value from different units at different times or you need to use one value from different units at the same time, you can use the Genealogy Event Alias or the Genealogy Variable Alias when configuring your calculations.

To assign an alias to an input variable:

  1. In the Plant Applications Administrator, open the Plant Model folder and locate the input variable.

  2. Right-click on the input variable and click Edit <variable name>.

  3. In the Variable Sheet dialog box, enter the variable's alias in the Variable Alias column.

If the Variable Alias column is not visible, click the Column/Row Visibility button and move Variable Alias from Hidden to Visible.

You must use the same alias for all input variables.

  1. Save the changes to the variable sheet.

  2. Repeat steps 1 – 4 for each input variable.

To create a calculation using variable aliases:

  1. In the Plant Applications Administrator, open the Plant Model folder and locate the calculation variable.

  2. Right-click on the calculation variable, choose Calculation and click Create Standard Calculation.

  3. In the Calculation Configuration dialog box, click the Define Calculation tab.

  4. Under General, select VB Script from the Type drop-down list.

  5. In the # of Inputs box, type the number of input variables.

  6. In the Trigger box, select Event/Variable.

  7. Click the Script tab and type your Visual Basic script calculation. Click here for some Visual Basic script examples.

  8. Click the Input tab and do the following for each input.

  1. Under Inputs, select an input.

  2. Under Selected Input, select either Genealogy Variable Alias or Genealogy Event Alias from the Entity drop-down list.

  3. Complete the other fields as necessary.

  1. Click the Identify Input Variables tab.

  2. Under Calculation Input Variables, select an input variable.

  3. Under Selected Input Details, click the Browse button to display the Search Variable dialog box.

  4. Search for the desired variable and click OK.

See Also