winIDEA SDK
test_set_multi.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_set_multi():
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 value1 = optCtrl.get("Name")
18 value2 = optCtrl.get("SymbolFiles.DefaultFile")
19
20 print("Setting new values for attributes 'Name' and 'SymbolFiles.DefaultFile'...")
21 inParams = ic.StrStrMap()
22 inParams["Name"] = "myName"
23 inParams["SymbolFiles.DefaultFile"] = "42"
24 optCtrl.set_multi(inParams)
25
26 print("Restoring original values...")
27 optCtrl.set("Name", value1)
28 optCtrl.set("SymbolFiles.DefaultFile", value2)
29
30
31if __name__ == "__main__":
32 test_set_multi()