winIDEA SDK
test_get_set_bool.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_getSetBool():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 optCtrl = ic.COptionController(connMgr, "/IDE/System.Debug.Applications[0].SymbolFiles.File[0]")
16
17 value = optCtrl.get_bool("Load")
18 print(f"Original value of 'SymbolFiles.File[0].Load' attribute: {value}")
19
20 print(f"Setting new value ({not value})...")
21 optCtrl.set_bool("Load", not value)
22
23 print(f"Restoring original value ({value})...")
24 optCtrl.set_bool("Load", value)
25
26
27if __name__ == "__main__":
28 test_getSetBool()