From 4653c918f341f536f70ea52c908e5c4f6af13d0c Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 5 Jun 2020 16:14:32 +0300 Subject: [PATCH] bos #19209 EDF 21531 - General problem of dumping a 9.4.0 study --- src/KERNEL_PY/salome_iapp.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index 04e1f2beb..6be459cb1 100644 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -186,3 +186,16 @@ def salome_iapp_close(): pass +def register_module_in_study(name, syncCall=True): + try: + import salome + salome.salome_init() + session_server = salome.naming_service.Resolve("/Kernel/Session") + if session_server: + message = "register_module_in_study/"+name + if syncCall: + session_server.emitMessage(message) + else: + session_server.emitMessageOneWay(message) + except: + pass \ No newline at end of file -- 2.39.2