From: rnv Date: Fri, 5 Jun 2020 13:14:32 +0000 (+0300) Subject: bos #19209 EDF 21531 - General problem of dumping a 9.4.0 study X-Git-Tag: V9_5_0rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV9_5_BR;p=modules%2Fkernel.git bos #19209 EDF 21531 - General problem of dumping a 9.4.0 study --- 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