winIDEA SDK
Loading...
Searching...
No Matches
test_find_or_start_instance.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import isystem.connect as ic
def test_find_or_start_instance():
print("Finding existing instance by ID, or starting new...")
cfg = ic.CConnectionConfig()
cfg.instanceId("sdk_example2")
cfg.start_if_required()
conn_mgr = ic.ConnectionMgr()
conn_mgr.connect(cfg)
# alternatively, user can find/start instance by specifying workspace file path
# cfg.workspace("C:/Desktop/myWorkspace/Sample.xjrf")
conn_mgr.disconnect_close(bSaveAll=False)
if __name__ == "__main__":
test_find_or_start_instance()