winIDEA SDK
test_doc_an_trig_process.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_doc_an_trig_process():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 cfgCtrl = ic.CConfigurationController(connMgr)
16
17 traceCtrl = ic.CTraceController(connMgr, "example.trd", "w")
18 optCtrl = cfgCtrl.doc("example.trd")
19
20 # Prerequisite for obtaining process configuration node,
21 # is to first select valid trigger.
22 trigOptCtrl = cfgCtrl.doc_an_triggers(optCtrl)
23 if trigOptCtrl.size() == 0:
24 trigOptCtrl = trigOptCtrl.add()
25 else:
26 trigOptCtrl = trigOptCtrl.at(0)
27
28 procOptCtrl = cfgCtrl.doc_an_trig_processes(trigOptCtrl)
29 url = procOptCtrl.URL()
30 print(f"URL of the 'document' controller for file 'example.trd', processes: {url}")
31
32 traceCtrl.close()
33
34
35if __name__ == "__main__":
36 test_doc_an_trig_process()