Declare
temporary variables within a .txt
file and use those temporary variables as new parameter
values or as parts of expressions that define new
parameter values.
Before you begin, learn about the
supported syntax for
.txt files.
-
Open a formatted .txt file.
-
Create a new line for the temporary variable.
-
Enter the temporary variable name in the parameter column and the variable value in the
value column.

Note
The variable name must start with a letter and contain only alphanumeric characters
or underscores.
-
Save the text file.
-
Configure VeriStand to allow temporary variables based on where you call the text
file.
Location |
How to configure |
Stimulus Profile Editor |
- Open a stimulus profile.
- On the Edit tab, select Update Model
Parameters from File.
- Set the Allow Temporary Variables property to
true.
|
Initializing parameters |
- Use System Explorer to apply initial values for
model parameters from a .txt file.
- On the Simulation Models page, click Allow
temporary variables.
|
Model Parameter Manager tab |
- Use the VeriStand Editor to import model
parameters.
- In the Configure Parameter Import dialog box, click
Allow local variables.
|
Model Parameter Manager Workspace tool |
- Use the Workspace to import model
parameters.
- In the Select Model Calibration File dialog box,
click Allow temporary variables.
|

Note
Allowing temporary variables causes
VeriStand to assume that any parameter column entries that do not exactly match model
parameter names are temporary variables. For example, if Allow Temporary Variables is
TRUE and you enter a model parameter name incorrectly, VeriStand creates a temporary
variable with the new name and uses that variable instead of the model parameter. You do
not receive an error notification about the name mismatch.
The following excerpt from the
ParameterUpdate2.txt example file shows how you can declare a temporary
variable,
tempConversionFactor. The variable is used in an expression that
defines the value of the
environment temperature (C) model parameter.

Note
This file uses a tab
delimiter.
tempConversionFactor 0.5
{environment temperature (C)} 50 * tempConversionFactor
This
file is part of the Update Model Parameters example, available in the <Common
Data>\Examples\Stimulus Profile\Engine Demo\Stimulus Profiles\
directory.