Solution
The Offline Results Processing Utility is launched via the NI_OfflineResultGenerator.seq sequence, which does not automatically inherit the configured environment. Instead, it defaults to the Global Environment, unless explicitly overridden via parameters in the launch step.
To solve this issue, you need to dynamically pass the environment using engine APIs
1. Navigate to the TestStand Model Plugin directory:
C:\Program Files\National Instruments\TestStand <ver>\Components\Models\ModelPlugins
2. Open the sequence file: NI_OfflineResultGenerator.seq
3. Go to: Model Plugin → Begin Sequence
4. Locate and select the step: Add Start in System Tray Argument
5. Modify the Expression to:
Locals.LaunchArguments += Parameters.ModelPlugin.PluginSpecific.Options.StartMinimizedToTray ? "/tray " : "",
Locals.LaunchArguments += RunState.Engine.GetEnvironmentPath() != "" ? "/env " + RunState.Engine.GetEnviromentPath() : ""
Reference:
Explanation:
- The first expression appends the parameter "/tray" to the launch arguments only if the StartMinimizedToTray option is enabled. If the option is not enabled, no value is added.
- The second expression checks whether an environment path is available. If it is not empty, it appends "/env" along with the environment path to the launch arguments. Otherwise, it adds nothing.
In summary, both expressions dynamically construct the command-line arguments by appending options only when the relevant conditions are met