Declaring Temporary Variables in a Model Parameter File
- Updated2025-10-27
- 2 minute(s) read
Declaring Temporary Variables in a Model Parameter File
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.
- 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.
tempConversionFactor 0.5
{environment temperature (C)} 50 * tempConversionFactorThis file is part of the Update Model Parameters example, available in the <Common Data>\Examples\Stimulus Profile\Engine Demo\Stimulus Profiles\ directory.
Related Information
- Supported Syntax in Model Parameter Files
Format text (.txt) files to the correct syntax before you apply them to a simulation model.
- Changing the Initial Value of Model Parameters
Configure VeriStand to apply initial values for model parameters from a .txt file when a system definition file deploys.
- Importing and Managing Batches of Model Parameters with the VeriStand Editor
Import model parameters with the Model Parameter Manager to apply values defined in an external .txt file to a model.
- Importing and Managing Batches of Model Parameters in the Workspace
Use the Model Parameter Manager tool to import and apply model parameter values defined in external .m or .txt files to a model.