]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Establishing of connection to the SHAPER-STUDY component
authormpv <mpv@opencascade.com>
Tue, 10 Dec 2019 09:30:27 +0000 (12:30 +0300)
committermpv <mpv@opencascade.com>
Tue, 10 Dec 2019 09:30:27 +0000 (12:30 +0300)
src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py

index 76481bb56d4cadf62bc88e3944e23263369d3ddb..725939b7b632f188adc895a391a03490c03b78d6 100644 (file)
@@ -28,6 +28,7 @@ import salome
 from salome.shaper import model
 
 import os
+import salome
 
 
 ## @ingroup Plugins
@@ -58,10 +59,12 @@ class PublishToStudyFeature(ModelAPI.ModelAPI_Feature):
 
     ## Exports all shapes and groups into the GEOM module.
     def execute(self):
+        print("### Execution of PublishToStudy")
+
+        ## Get SHAPER active document
         aSession = ModelAPI.ModelAPI_Session.get()
-        ## Get active document
-        self.Part = aSession.activeDocument()
+        # find a shaper-study component
         salome.salome_init(1)
-
-        print("### Excutation of PublishToStudy")
-        pass
+        import SHAPERSTUDY_utils
+        SHAPERSTUDY_utils.findOrCreateComponent()
+        anEngine = SHAPERSTUDY_utils.getEngine()