From: mpv Date: Tue, 10 Dec 2019 09:30:27 +0000 (+0300) Subject: Establishing of connection to the SHAPER-STUDY component X-Git-Tag: V9_5_0a1~17^2~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=26154600988e3a219d00ad62e90d7f46d503dfed;p=modules%2Fshaper.git Establishing of connection to the SHAPER-STUDY component --- 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()