winIDEA SDK
test_get_set.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_getSet():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 optCtrl = ic.COptionController(connMgr, "/IDE/System.Debug.Applications[0]")
16
17 value = optCtrl.get("Name")
18 print(f"Current value of 'Name' attribute: {value}")
19
20 optCtrl.set("Name", "myName")
21 print(f"New value of 'Name' attribute: {optCtrl.get('Name')}")
22
23 print("Restoring original name value...")
24 optCtrl.set("Name", value)
25
26
27if __name__ == "__main__":
28 test_getSet()