Skip to main content

station_options_update/
station_options_update.rs

1//! Example: Provision TestStand station options programmatically.
2
3use rs_teststand::Engine;
4
5fn main() -> Result<(), rs_teststand::Error> {
6    let engine = Engine::new()?;
7    let station_options = engine.station_options()?;
8
9    station_options.set_tracing_enabled(true)?;
10    station_options.set_disable_results(false)?;
11    station_options.set_breakpoints_enabled(true)?;
12    station_options.set_check_out_files_when_edited(false)?;
13    station_options.set_language("English")?;
14    station_options.set_always_goto_cleanup_on_failure(true)?;
15    station_options.set_show_hidden_properties(true)?;
16    station_options.set_prompt_to_find_files(false)?;
17    station_options.set_auto_login_system_user(true)?;
18    station_options.set_ui_message_delay(100)?;
19    station_options.set_ui_message_min_delay(10)?;
20    station_options.set_station_id("STATION_RUST_01")?;
21    station_options.set_use_station_model(true)?;
22    station_options.set_allow_other_models(false)?;
23    station_options.set_use_localized_decimal_point(false)?;
24    station_options.set_time_limit(0, 0, 60.0)?;
25    station_options.set_time_limit_enabled(0, 0, true)?;
26
27    engine.commit_globals_to_disk(false)?;
28    println!("Station options updated and committed to disk.");
29
30    Ok(())
31}