From 26154600988e3a219d00ad62e90d7f46d503dfed Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 10 Dec 2019 12:30:27 +0300 Subject: [PATCH] Establishing of connection to the SHAPER-STUDY component --- .../ConnectorPlugin_PublishToStudyFeature.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py b/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py index 76481bb56..725939b7b 100644 --- a/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py +++ b/src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py @@ -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() -- 2.39.2