StudyIn node
...................
-A StudyIn node has output data ports only. It is used to define data in the calculation scheme originating from a SALOME study. The associated study is given by its SALOME StudyID.
+A StudyIn node has output data ports only. It is used to define data in the calculation scheme originating from a SALOME study.
A port corresponds to data stored in the associated study. The data has a name (the port name), a type (the port type), and a reference that gives the entry into the study. This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1).
StudyOut node
...................
-A StudyOut node only has input data ports. It is used to store results in a SALOME study. The associated study is given by its SALOME StudyID.
+A StudyOut node only has input data ports. It is used to store results in a SALOME study.
A port corresponds to a result to be stored in an associated study. The result has a name (the port name), a type (the port type), and a reference that gives the entry into the study. This reference is either a SALOME Entry (for example 0:1:1:2) or a path in the SALOME study tree (for example, /Geometry/box_1).
value of 1 and a default case, then the absolute name of node “n” in the case 1 will be “c.b.p1_n” and the absolute name of the node in
the default case will be “c.b.default_n”.
-Active study
---------------
-A schema can be executed without using the SALOME study manager. But when a schema must be executed in the context
-of a SALOME study, it is possible to specify the studyId to use.
-
-The way to do that is to set the schema property **DefaultStudyID** to the study id.
-
-In the GUI, this is set automatically to the current active studyId.
-For execution in console mode, see :ref:`xml_active_study`
-
.. _errorreport:
Error report
StudyIn node
++++++++++++++
A StudyIn node is defined using the runtime createInDataNode method. It uses two arguments, the first of which must be “study”
-and the second the node name. The associated study is specified by adding the “StudyID” property to the node using
-its setProperty method. Node data are defined by adding output data ports using the edAddOutputPOrt method, transferring
+and the second the node name. Node data are defined by adding output data ports using the edAddOutputPOrt method, transferring
the name of the data and its type as arguments. The data is initialised with the reference in the study, using the setData method
for the port thus created, transferring a character string to it containing either the SALOME Entry or the path in the study
tree structure.
The following is an example of the StudyIn node that defines 2 GEOM_Object type data (a and b). The study is assumed to be
-loaded into memory by SALOME as StudyID 1. Data a is referenced by one SALOME Entry. Data b is referenced by a path in the
+loaded into memory by SALOME. Data a is referenced by one SALOME Entry. Data b is referenced by a path in the
study tree structure::
n=r.createInDataNode("study","study1")
p.edAddChild(n)
- n.setProperty("StudyID","1")
pout=n.edAddOutputPort('a',tgeom)
pout.setData("0:1:1:1")
pout=n.edAddOutputPort('b',tgeom)
StudyOut node
++++++++++++++
A StudyOut node is defined using the runtime createOutDataNode method. It uses two arguments, the first of
-which must be “study” and the second the node name. The associated study is specified by adding
-the “StudyID” property to the node using its setProperty method. The name of the file in which the study will be
+which must be “study” and the second the node name. The name of the file in which the study will be
saved is specified using the node SetRef method with the file name as an argument.
The node results are defined by adding input data ports to it using the edAddInputPort method, transferring the data name
and type as arguments. The setData method for the port is used to associate the entry into the study to the result, transferring
a character string to it that contains either the SALOME Entry or the path in the study tree structure.
The following contains an example of the StudyOut node that defines two GEOM_Object type results (a and b).
-The studyId of the study used is 1. Result a is referenced by a SALOME Entry. The result b is referenced by a path.
+Result a is referenced by a SALOME Entry. The result b is referenced by a path.
The complete study is saved in the study1.hdf file at the end of the calculation::
n=r.createOutDataNode("study","study2")
n.setRef("study1.hdf")
p.edAddChild(n)
- n.setProperty("StudyID","1")
pout=n.edAddInputPort('a',tgeom)
pout.setData("0:1:2:1")
pout=n.edAddInputPort('b',tgeom)
.. _xml_active_study:
-Active study
---------------
-To execute a schema in the context of a SALOME study, you have to set the **DefaultStudyID** property of the schema.
-
-Example to execute the schema in the study with studyId 5:
-
-.. code-block:: xml
-
- <proc name="myschema">
- <property name="DefaultStudyID" value="5"/>
- ...
- </proc>
-
-
Datastream connections
----------------------------
Datastream connections are only possible for SALOME service nodes, as we have seen in :ref:`principes`. Firstly, datastream ports
StudyIn node
'''''''''''''''
This type of node is defined as a DataIn node with the datanode tag. All that is necessary is to add the kind attribute
-with the “study” value. The associated study is given by a property (property tag) named StudyID (the value of which is an integer).
+with the “study” value.
The parameter sub-tag will be used to define the node data. This tag has two compulsory attributes, name and type, that give the
data name and type respectively. The ref attribute gives the input into the study in the form of a SALOME Entry, or a
path in the study tree structure.
The following is an example of a StudyIn node that defines 2 data (b and c) with types GEOM_Object and Boolean. It is assumed
-that SALOME has loaded the study (with StudyID 1) into memory. Data b is referenced by a SALOME Entry.
+that SALOME has loaded the study into memory. Data b is referenced by a SALOME Entry.
The data c is referenced by a path in the study tree structure.
.. code-block:: xml
<datanode name="s" kind="study" >
- <property name="StudyID" value="1" />
<parameter name="b" type="GEOM/GEOM_Object" ref="0:1:2:2"/>
<parameter name="c" type="bool" ref="/Geometry/Box_1"/>
</datanode>
''''''''''''''''''
This type of node is defined as a DataOut node with the outnode tag and the name attribute.
All that is necessary is to add the kind attribute with the value “study”.
-The optional ref attribute gives the name of the file in which the study will be saved at the end of the calculation.
-The associated study is given by a property (property tag) with name StudyID (the value of which is an integer).
+The optional ref attribute gives the name of the file in which the study will be saved at the end of the calculation.
The parameter sub-tag will be used to define the node results. This tag has two compulsory attributes, name and type, that
give the data name and type respectively. The ref attribute gives the entry into the study in the form of a SALOME Entry, or
a path in the study tree structure.
-The following gives an example of the StudyOut node that defines 2 results (a and b) of the GEOM_Object type. The study used has
-the studyId 1. The complete study is saved in the study1.hdf file at the end of the calculation:
+The following gives an example of the StudyOut node that defines 2 results (a and b) of the GEOM_Object type.
+The complete study is saved in the study1.hdf file at the end of the calculation:
.. code-block:: xml
<outnode name="o" kind="study" ref="stud1.hdf">
- <property name="StudyID" value="1"/>
<parameter name="a" type="GEOM/GEOM_Object" ref="/Geometry/YacsFuse"/>
<parameter name="b" type="GEOM/GEOM_Object" ref="0:1:1:6"/>
</outnode>
break;
}
}
- int studyId = _wrapper->activeStudyId();
- if (context->getStudyId() == studyId)
+ _wrapper->deleteSchema(view);
+ DEBTRACE("delete context");
+ if (GuiExecutor* exec = context->getGuiExecutor())
{
- _wrapper->deleteSchema(view);
- DEBTRACE("delete context");
- if (GuiExecutor* exec = context->getGuiExecutor())
- {
- exec->closeContext();
- }
- delete context;
- _mapViewContext.erase(view);
- switchContext(newView, onExit);
+ exec->closeContext();
}
+ delete context;
+ _mapViewContext.erase(view);
+ switchContext(newView, onExit);
return true;
}
GraphicsView* gView = new GraphicsView(viewWindow);
gView->setScene(scene);
gView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
- int studyId = _wrapper->AssociateViewToWindow(gView, viewWindow);
- context->setStudyId(studyId);
- std::ostringstream value;
- value << studyId;
- proc->setProperty("DefaultStudyID",value.str());
context->setScene(scene);
context->setView(gView);
context->setWindow(viewWindow);
void GenericGui::onCleanOnExit()
{
DEBTRACE("GenericGui::onCleanOnExit");
- int studyId = _wrapper->activeStudyId();
map<QWidget*, YACS::HMI::QtGuiContext*> mapViewContextCopy = _mapViewContext;
map<QWidget*, YACS::HMI::QtGuiContext*>::iterator it = mapViewContextCopy.begin();
for (; it != mapViewContextCopy.end(); ++it)
SALOME_NamingService namingService(orb);
SALOME_LifeCycleCORBA lcc(&namingService);
ostringstream containerName;
- containerName << "localhost/YACSContainer" << QtGuiContext::getQtCurrent()->getStudyId();
+ containerName << "localhost/YACSContainer";
Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" );
_engineRef =YACS_ORB::YACS_Gen::_narrow(comp);
YASSERT(!CORBA::is_nil(_engineRef));
_selectedSubject = 0;
_isEdition = true;
_isLoadingPresentation = false;
- _studyId = 0;
_fileName = QString();
_mapOfSchemaItem.clear();
_mapOfSceneItem.clear();
inline QString getFileName() {return _fileName; };
inline YACS::HMI::GuiExecutor* getGuiExecutor() {return _guiExecutor; };
inline bool isEdition() {return _isEdition; };
- inline int getStudyId() {return _studyId; };
inline bool isLoadingPresentation() {return _isLoadingPresentation; };
YACS::HMI::Subject* getSubjectToPaste(bool &isCut);
inline void setFileName(const QString& fileName) {_fileName = fileName; };
inline void setGuiExecutor(YACS::HMI::GuiExecutor* guiEx) {_guiExecutor = guiEx; };
inline void setEdition(bool isEdition) {_isEdition = isEdition; };
- inline void setStudyId(int studyId) {_studyId = studyId; };
inline void setLoadingPresentation(bool isLoadpres) {_isLoadingPresentation = isLoadpres; };
void setSubjectToCut(YACS::HMI::Subject* sub);
YACS::HMI::Subject* _selectedSubject;
bool _isEdition;
bool _isLoadingPresentation;
- int _studyId;
SuitWrapper* _wrapper;
};
<inParameter-type>string</inParameter-type>
<inParameter-name>CreateHypothesis__anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>CreateHypothesis__studyId</inParameter-name>
- </inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<inParameter-type>string</inParameter-type>
<inParameter-name>anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>studyId</inParameter-name>
- </inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
</data>
<data>
<fromnode-name>aNewDataFlow_1</fromnode-name>
- <fromserviceparameter-name>CreateHypothesis__studyId</fromserviceparameter-name>
<tonode-name>CreateHypothesis</tonode-name>
- <toserviceparameter-name>studyId</toserviceparameter-name>
<data-value>
<value-type>3</value-type>
<value>1</value>
<inParameter-type>string</inParameter-type>
<inParameter-name>CreateHypothesis__anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>CreateHypothesis__studyId</inParameter-name>
- </inParameter>
<inParameter>
<inParameter-type>GEOM_Shape</inParameter-type>
<inParameter-name>AddHypothesis__aSubShape</inParameter-name>
<inParameter-type>string</inParameter-type>
<inParameter-name>anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>studyId</inParameter-name>
- </inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
</data>
<data>
<fromnode-name>aNewDataFlow_1</fromnode-name>
- <fromserviceparameter-name>CreateHypothesis__studyId</fromserviceparameter-name>
<tonode-name>CreateHypothesis</tonode-name>
- <toserviceparameter-name>studyId</toserviceparameter-name>
<data-value>
<value-type>3</value-type>
<value>1</value>
<inParameter-type>string</inParameter-type>
<inParameter-name>CreateHypothesis__anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>CreateHypothesis__studyId</inParameter-name>
- </inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
<inParameter-type>string</inParameter-type>
<inParameter-name>anHyp</inParameter-name>
</inParameter>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>studyId</inParameter-name>
- </inParameter>
</inParameter-list>
<outParameter-list>
<outParameter>
</data>
<data>
<fromnode-name>aNewDataFlow_1</fromnode-name>
- <fromserviceparameter-name>CreateHypothesis__studyId</fromserviceparameter-name>
<tonode-name>CreateHypothesis</tonode-name>
- <toserviceparameter-name>studyId</toserviceparameter-name>
<data-value>
<value-type>3</value-type>
<value>1</value>
return false;
}
-CppComponent * CppContainer::createComponentInstance(const std::string & componentName, int /* studyID */)
+CppComponent * CppContainer::createComponentInstance(const std::string & componentName)
{
DEBTRACE("CppContainer::createComponentInstance");
if (_trueCont)
void checkCapabilityToDealWith(const ComponentInstance *inst) const throw (YACS::Exception);
bool loadComponentLibrary(const std::string & componentName) throw (YACS::Exception);
- CppComponent * createComponentInstance(const std::string & componentName, int studyID = 0);
+ CppComponent * createComponentInstance(const std::string & componentName);
void createInternalInstance(const std::string & componentName,
void *& obj, RunFunction &r, TerminateFunction &t);
void unregisterComponentInstance(CppComponent * C);
YACS::BASES::AutoLocker<Container> alck(this);//To be sure
std::string compoName(inst->getCompoName());
Engines::Container_var container(_launchModeType->getContainer(askingNode));
- objComponent=container->find_component_instance(compoName.c_str(),0);
+ objComponent=container->find_component_instance(compoName.c_str());
if(CORBA::is_nil(objComponent))
{
char *reason;
char *reason(0);
std::string compoName(inst->getCompoName());
CORBA::Object_ptr objComponent=CORBA::Object::_nil();
- int studyid(1);
Proc* p(cont->getProc());
- if(p)
- {
- std::string value(p->getProperty("DefaultStudyID"));
- if(!value.empty())
- studyid= atoi(value.c_str());
- }
// prepare component instance properties
Engines::FieldsDict_var env(new Engines::FieldsDict);
std::map<std::string, std::string> properties(inst->getProperties());
env[item].value <<= itm->second.c_str();
}
- objComponent=contPtr->create_component_instance_env(compoName.c_str(), studyid, env, reason);
+ objComponent=contPtr->create_component_instance_env(compoName.c_str(), env, reason);
if(CORBA::is_nil(objComponent))
{
std::string text="Error while trying to create a new component: component '"+ compoName;
vss.closeFileSchema();
}
-//! Get the default study id for the proc
-/*!
- * \return the study id
- */
-int SalomeProc::getDefaultStudyId()
-{
- std::string value=getProperty("DefaultStudyID");
- if(value.empty())
- return 1;
- else
- return atoi(value.c_str());
-}
-
//! Initialise the proc
void SalomeProc::init(bool start)
{
- std::string value=getProperty("DefaultStudyID");
- if(!value.empty())
- {
- //initialise Python module salome with the study id given by value
- std::string cmd="import salome;salome.salome_init("+value+")";
- PyGILState_STATE gstate = PyGILState_Ensure(); // acquire the Global Interpreter Lock
- PyRun_SimpleString(cmd.c_str());
- PyGILState_Release(gstate); // Release the Global Interpreter Lock
- }
+ //initialise Python module salome with the study id given by value
+ std::string cmd="import salome;salome.salome_init()";
+ PyGILState_STATE gstate = PyGILState_Ensure(); // acquire the Global Interpreter Lock
+ PyRun_SimpleString(cmd.c_str());
+ PyGILState_Release(gstate); // Release the Global Interpreter Lock
Proc::init(start);
}
virtual TypeCode * createStructTc(const std::string& id, const std::string& name);
virtual std::string typeName() {return "YACS__ENGINE__SalomeProc";}
virtual void saveSchema(std::string xmlSchemaFile);
- virtual int getDefaultStudyId();
virtual void init(bool start=true);
};
}
{
DEBTRACE("+++++++ StudyInNode::execute +++++++++++");
SALOME_NamingService NS(getSALOMERuntime()->getOrb());
- CORBA::Object_var obj=NS.Resolve("/myStudyManager");
+ CORBA::Object_var obj=NS.Resolve("/Study");
if(CORBA::is_nil(obj))
{
_errorDetails="Execution problem: no naming service";
throw Exception(_errorDetails);
}
- SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(obj);
- if(CORBA::is_nil(aStudyManager))
- {
- _errorDetails="Execution problem: no naming service";
- throw Exception(_errorDetails);
- }
-
- int studyid=1;
- if (getProperty("StudyID") != "")
- {
- // StudyId is specified
- studyid=atoi(getProperty("StudyID").c_str());
- }
- else
- {
- Proc* p=getProc();
- if(p)
- {
- std::string value=p->getProperty("DefaultStudyID");
- if(!value.empty())
- studyid= atoi(value.c_str());
- }
- }
-
-
- SALOMEDS::Study_var myStudy =aStudyManager->GetStudyByID(studyid);
+ SALOMEDS::Study_var myStudy = SALOMEDS::Study::_narrow(obj);
if(CORBA::is_nil(myStudy))
{
- std::stringstream msg;
- msg << "Execution problem: no study with id " << studyid;
- _errorDetails=msg.str();
+ _errorDetails="Execution problem: no study";
throw Exception(_errorDetails);
}
{
DEBTRACE("+++++++ StudyOutNode::execute +++++++++++");
SALOME_NamingService NS(getSALOMERuntime()->getOrb());
- CORBA::Object_var obj=NS.Resolve("/myStudyManager");
+ CORBA::Object_var obj=NS.Resolve("/Study");
if(CORBA::is_nil(obj))
{
_errorDetails="Execution problem: no naming service";
throw Exception(_errorDetails);
}
- SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(obj);
- if(CORBA::is_nil(aStudyManager))
- {
- _errorDetails="Execution problem: no naming service";
- throw Exception(_errorDetails);
- }
-
- int studyid=1;
- if (getProperty("StudyID") != "")
- {
- // StudyId is specified
- studyid=atoi(getProperty("StudyID").c_str());
- }
- else
- {
- Proc* p=getProc();
- if(p)
- {
- std::string value=p->getProperty("DefaultStudyID");
- if(!value.empty())
- studyid= atoi(value.c_str());
- }
- }
-
- SALOMEDS::Study_var myStudy =aStudyManager->GetStudyByID(studyid);
+ SALOMEDS::Study_var myStudy = SALOMEDS::Study::_narrow(obj);
if(CORBA::is_nil(myStudy))
{
- //open a new one
- std::stringstream msg;
- msg << "Study" << studyid;
- myStudy=aStudyManager->NewStudy(msg.str().c_str());
- if(CORBA::is_nil(myStudy))
- {
- _errorDetails="Execution problem: can not create new study " + msg.str();
- throw Exception(_errorDetails);
- }
+ _errorDetails="Execution problem: no study";
+ throw Exception(_errorDetails);
}
- DEBTRACE(myStudy->StudyId());
SALOMEDS::StudyBuilder_var aBuilder =myStudy->NewBuilder() ;
if(CORBA::is_nil(aBuilder))
// save in file if ref is given
if(_ref != "")
{
- aStudyManager->SaveAs(_ref.c_str(),myStudy, false);
+ myStudy->SaveAs(_ref.c_str(), false);
}
DEBTRACE("+++++++ end StudyOutNode::execute +++++++++++" );
}
if(CORBA::is_nil(aSO))
{
std::stringstream msg;
- msg << "Execution problem: no id or path: " << data << " in study " << myStudy->StudyId();
+ msg << "Execution problem: no id or path: " << data << " in study";
throw Exception(msg.str());
}
}
SALOMEDS::SObject_var aTmpSO; // initialized to nil
try
{
- aTmpSO = aDriver->PublishInStudy(myStudy, aTmpSO, anObject,objname.c_str() );
+ aTmpSO = aDriver->PublishInStudy(aTmpSO, anObject,objname.c_str() );
return;
}
catch ( ... )
using namespace std;
using namespace YACS::HMI;
-int Yacsgui::_oldStudyId = -1;
-
Yacsgui::Yacsgui() :
SalomeWrap_Module( "YACS" ) // default name
{
_wrapper = 0;
_genericGui = 0;
_selectFromTree = false;
- _studyContextMap.clear();
+ _studyContextMap = 0;
}
Yacsgui::~Yacsgui()
_genericGui->createActions();
_genericGui->createMenus();
_genericGui->createTools();
- this->studyActivated();
+ _studyContextMap = QtGuiContext::getQtCurrent();
// VSR 23/10/2014: note that this is not a good way to create SComponent from this point
// as initialize() method can be potentially called when there's no yet open study;
setToolShown( false );
_genericGui->showDockWidgets(false);
QtGuiContext *context = QtGuiContext::getQtCurrent();
- _studyContextMap[theStudy->id()] = context;
- DEBTRACE("_studyContextMap[theStudy] " << theStudy << " " << context);
+ _studyContextMap = context;
+ DEBTRACE("_studyContextMap " << theStudy << " " << context);
return SalomeApp_Module::deactivateModule( theStudy );
}
YASSERT(_genericGui);
_genericGui->switchContext(viewWindow);
- _studyContextMap[getApp()->activeStudy()->id()] = QtGuiContext::getQtCurrent();
+ _studyContextMap = QtGuiContext::getQtCurrent();
if (_selectFromTree) return;
SalomeWrap_DataModel *model = dynamic_cast<SalomeWrap_DataModel*>(dataModel());
}
}
-void Yacsgui::studyActivated()
-{
- int newStudyId = getApp()->activeStudy()->id();
- DEBTRACE("Yacsgui::studyActivated " << _oldStudyId << " " << newStudyId);
-
- if (_oldStudyId != -1)
- {
- _studyContextMap[_oldStudyId] = QtGuiContext::getQtCurrent();
- if (_studyContextMap.count(newStudyId))
- {
- DEBTRACE("switch to valid context " << QtGuiContext::getQtCurrent() << " " << _studyContextMap[newStudyId]);
- QtGuiContext::setQtCurrent(_studyContextMap[newStudyId]);
- }
- else
- {
- DEBTRACE("no switch to null context");
- }
- }
- _oldStudyId = newStudyId;
-}
-
void Yacsgui::loadSchema(const std::string& filename,bool edit, bool arrangeLocalNodes)
{
_genericGui->loadSchema(filename,edit,arrangeLocalNodes);
virtual void createPreferences();
virtual void preferencesChanged( const QString& sect, const QString& name );
virtual void loadSchema(const std::string& filename,bool edit=true, bool arrangeLocalNodes=false);
- virtual void studyActivated();
public slots:
bool deactivateModule( SUIT_Study* theStudy);
bool _selectFromTree;
Yacsgui_Resource* _myresource;
SUIT_ViewWindow* _currentSVW;
- std::map<int, YACS::HMI::QtGuiContext*> _studyContextMap;
- static int _oldStudyId;
+ YACS::HMI::QtGuiContext* _studyContextMap;
};
#endif
<?xml version='1.0'?>
<proc>
- <property name="DefaultStudyID" value="1"/>
<objref name="GEOM_Shape" id="IDL:GEOM/GEOM_Object:1.0"/>
<type name="bool" kind="bool"/>
<sequence name="boolvec" content="bool"/>
<x-position>0</x-position>
<y-position>0</y-position> </node> </info-list>
<node-list>
-<node>
-<component-name>GEOM_Superv</component-name>
- <interface-name>GEOM_Superv</interface-name>
- <node-name>SetStudyID</node-name>
- <kind>0</kind>
- <coupled-node>?</coupled-node>
- <service>
-<service-name>SetStudyID</service-name>
- <inParameter-list>
-<inParameter>
-<inParameter-type>long</inParameter-type>
- <inParameter-name>theStudyID</inParameter-name> </inParameter> </inParameter-list>
- <outParameter-list/> </service>
- <DataStream-list/>
- <PyFunction-list/>
- <creation-date>6/6/2005 - 10:39:55</creation-date>
- <lastmodification-date>6/6/2005 - 10:39:55</lastmodification-date>
- <editor-release>2.0</editor-release>
- <author>?</author>
- <container>localhost/FactoryServer</container>
- <comment>SetStudyID from GEOM_Superv</comment>
- <x-position>14</x-position>
- <y-position>241</y-position> </node>
+
<node>
<component-name>GEOM_Superv</component-name>
<interface-name>GEOM_Superv</interface-name>
<x-position>993</x-position>
<y-position>312</y-position> </node> </node-list>
<link-list>
-<link>
-<fromnode-name>SetStudyID</fromnode-name>
- <fromserviceparameter-name>Gate</fromserviceparameter-name>
- <tonode-name>MakeBox</tonode-name>
- <toserviceparameter-name>Gate</toserviceparameter-name>
- <coord-list/> </link>
- <link>
-<fromnode-name>SetStudyID</fromnode-name>
- <fromserviceparameter-name>Gate</fromserviceparameter-name>
- <tonode-name>MakeSphere_1</tonode-name>
- <toserviceparameter-name>Gate</toserviceparameter-name>
- <coord-list/> </link>
<link>
<fromnode-name>MakeBox</fromnode-name>
<fromserviceparameter-name>return</fromserviceparameter-name>
<toserviceparameter-name>theShape1</toserviceparameter-name>
<coord-list/> </link> </link-list>
<data-list>
-<data>
-<fromnode-name>GeomGraph</fromnode-name>
- <fromserviceparameter-name>SetStudyID__theStudyID</fromserviceparameter-name>
- <tonode-name>SetStudyID</tonode-name>
- <toserviceparameter-name>theStudyID</toserviceparameter-name>
- <data-value>
-<value-type>3</value-type>
- <value>1</value> </data-value>
- <coord-list/> </data>
<data>
<fromnode-name>GeomGraph</fromnode-name>
<fromserviceparameter-name>MakeBox__theX1</fromserviceparameter-name>
<service>
<service-name>GeomGraph</service-name>
<inParameter-list>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>SetStudyID__theStudyID</inParameter-name>
- </inParameter>
<inParameter>
<inParameter-type>double</inParameter-type>
<inParameter-name>MakeBox__theX1</inParameter-name>
</node>
</info-list>
<node-list>
- <node>
- <component-name>GEOM_Superv</component-name>
- <interface-name>GEOM_Superv</interface-name>
- <node-name>SetStudyID</node-name>
- <kind>0</kind>
- <coupled-node>?</coupled-node>
- <service>
- <service-name>SetStudyID</service-name>
- <inParameter-list>
- <inParameter>
- <inParameter-type>long</inParameter-type>
- <inParameter-name>theStudyID</inParameter-name>
- </inParameter>
- </inParameter-list>
- <outParameter-list/>
- </service>
- <DataStream-list/>
- <PyFunction-list/>
- <creation-date>14/12/2005 - 14:39:18</creation-date>
- <lastmodification-date>14/12/2005 - 14:39:18</lastmodification-date>
- <editor-release>2.0</editor-release>
- <author>?</author>
- <container>localhost/FactoryServer</container>
- <comment>SetStudyID from GEOM_Superv</comment>
- <x-position>14</x-position>
- <y-position>241</y-position>
- </node>
<node>
<component-name>GEOM_Superv</component-name>
<interface-name>GEOM_Superv</interface-name>
</node>
</node-list>
<link-list>
- <link>
- <fromnode-name>SetStudyID</fromnode-name>
- <fromserviceparameter-name>Gate</fromserviceparameter-name>
- <tonode-name>MakeBox</tonode-name>
- <toserviceparameter-name>Gate</toserviceparameter-name>
- <coord-list/>
- </link>
<link>
<fromnode-name>MakeBox</fromnode-name>
<fromserviceparameter-name>return</fromserviceparameter-name>
</link>
</link-list>
<data-list>
- <data>
- <fromnode-name>GeomGraph</fromnode-name>
- <fromserviceparameter-name>SetStudyID__theStudyID</fromserviceparameter-name>
- <tonode-name>SetStudyID</tonode-name>
- <toserviceparameter-name>theStudyID</toserviceparameter-name>
- <data-value>
- <value-type>3</value-type>
- <value>1</value>
- </data-value>
- <coord-list/>
- </data>
<data>
<fromnode-name>GeomGraph</fromnode-name>
<fromserviceparameter-name>MakeBox__theX1</fromserviceparameter-name>
<PyFunc><![CDATA[ shape = MakeBoolean(shape1,shape2,3) ]]></PyFunc>
<PyFunc><![CDATA[ from SALOME_NamingServicePy import SALOME_NamingServicePy_i ]]></PyFunc>
<PyFunc><![CDATA[ myNamingService = SALOME_NamingServicePy_i(orb) ]]></PyFunc>
- <PyFunc><![CDATA[ aSession = myNamingService.Resolve('/Kernel/Session') ]]></PyFunc>
- <PyFunc><![CDATA[ aStudyId = aSession.GetActiveStudyId() ]]></PyFunc>
- <PyFunc><![CDATA[ myStudyManager = myNamingService.Resolve('/myStudyManager') ]]></PyFunc>
- <PyFunc><![CDATA[ aStudy = myStudyManager.GetStudyByID(aStudyId) ]]></PyFunc>
+ <PyFunc><![CDATA[ aStudy = myNamingService.Resolve('/Study') ]]</PyFunc>
<PyFunc><![CDATA[ aSObject = geom.AddInStudy(aStudy, shape, "shape", None) ]]></PyFunc>
<PyFunc><![CDATA[ return shape ]]></PyFunc>
</PyFunction>
<PyFunc><![CDATA[ # fuse operation 3 ]]></PyFunc>
<PyFunc><![CDATA[ shape = MakeBoolean(shape1,shape2,3) ]]></PyFunc>
<PyFunc><![CDATA[ myNamingService = SALOME_NamingServicePy_i(orb) ]]></PyFunc>
- <PyFunc><![CDATA[ aSession = myNamingService.Resolve('/Kernel/Session') ]]></PyFunc>
- <PyFunc><![CDATA[ if aSession == None : ]]></PyFunc>
- <PyFunc><![CDATA[ aStudyId = 1 ]]></PyFunc>
- <PyFunc><![CDATA[ else : ]]></PyFunc>
- <PyFunc><![CDATA[ aStudyId = aSession.GetActiveStudyId() ]]></PyFunc>
- <PyFunc><![CDATA[ myStudyManager = myNamingService.Resolve('/myStudyManager') ]]></PyFunc>
- <PyFunc><![CDATA[ aStudy = myStudyManager.GetStudyByID(aStudyId) ]]></PyFunc>
+ <PyFunc><![CDATA[ aStudy = myNamingService.Resolve('/Study') ]]</PyFunc>
<PyFunc><![CDATA[ aSObject = geom.AddInStudy(aStudy, shape, "shape", None) ]]></PyFunc>
<PyFunc><![CDATA[ return shape ]]></PyFunc> </PyFunction> </PyFunction-list>
<creation-date>29/10/2004 - 10:50:25</creation-date>
<PyFunc><![CDATA[ # --- create a naming service instance ]]></PyFunc>
<PyFunc><![CDATA[ naming_service = SALOME_NamingServicePy_i(orb) ]]></PyFunc>
<PyFunc><![CDATA[ # --- get Study Manager reference ]]></PyFunc>
- <PyFunc><![CDATA[ obj = naming_service.Resolve('myStudyManager') ]]></PyFunc>
- <PyFunc><![CDATA[ StudyManager = obj._narrow(SALOMEDS.StudyManager) ]]></PyFunc>
+ <PyFunc><![CDATA[ obj = naming_service.Resolve('Study') ]]></PyFunc>
+ <PyFunc><![CDATA[ aStudy = obj._narrow(SALOMEDS.Study) ]]></PyFunc>
<PyFunc><![CDATA[ # --- load visu component ]]></PyFunc>
<PyFunc><![CDATA[ aVisu = lcc.FindOrLoadComponent("FactoryServer","VISU") ]]></PyFunc>
- <PyFunc><![CDATA[ aStudy = StudyManager.GetStudyByID(1) ]]></PyFunc>
<PyFunc><![CDATA[ aVisu.SetCurrentStudy(aStudy) ]]></PyFunc>
<PyFunc><![CDATA[ print "InitDisplay --> aVisu ", aVisu ]]></PyFunc>
<PyFunc><![CDATA[ time.sleep(2) ]]></PyFunc>
return aView;
}
-int SalomeWrap_Module::AssociateViewToWindow(QGraphicsView* gView,
- QxScene_ViewWindow* viewWindow)
-{
- viewWindow->setSceneView(gView);
- viewWindow->setCentralWidget(gView);
- return viewWindow->getViewManager()->study()->id();
-}
-
-int SalomeWrap_Module::activeStudyId()
-{
- return getApp()->activeStudy()->id();
-}
-
QDockWidget* SalomeWrap_Module::objectBrowser() {
if ( !getApp()->objectBrowser() )
return 0;
QxScene_ViewWindow* getNewWindow(QGraphicsScene *scene);
- int AssociateViewToWindow(QGraphicsView* gView,
- QxScene_ViewWindow* viewWindow);
-
- int activeStudyId();
-
QDockWidget* objectBrowser();
QAction* wCreateAction(const int id,
return module->getNewWindow(scene);
}
-/*!
- * return studyId used in context delete when study is closed.
- */
-int SuitWrapper::AssociateViewToWindow(QGraphicsView* gView, QWidget* viewWindow)
-{
- SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
- QxScene_ViewWindow *svw = dynamic_cast<QxScene_ViewWindow*>(viewWindow);
- YASSERT(svw);
- int studyId = module->AssociateViewToWindow(gView, svw);
- WrapGraphicsView* wgv = dynamic_cast<WrapGraphicsView*>(gView);
- YASSERT(wgv);
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewFitAll()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewFitAll()));
-
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewFitArea()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewFitArea()));
-
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewZoom()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewZoom()));
-
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::PanId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewPan()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::PanId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewPan()));
-
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewGlobalPan()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewGlobalPan()));
-
- QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId),
- SIGNAL(triggered(bool)),
- svw, SLOT(onViewReset()));
- QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId),
- SIGNAL(triggered(bool)),
- wgv, SLOT(onViewReset()));
- return studyId;
-}
-
-int SuitWrapper::activeStudyId()
-{
- SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
- return module->activeStudyId();
-}
-
QDockWidget* SuitWrapper::objectBrowser()
{
SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
virtual ~SuitWrapper();
QWidget* getNewWindow(QGraphicsScene *scene);
- int AssociateViewToWindow(QGraphicsView* gView, QWidget* viewWindow);
- int activeStudyId();
QDockWidget* objectBrowser();
QAction* createAction(const int id,
--help : affichage de l'aide
--gui : lancement du GUI
--logger : redirection des messages dans un fichier
---xterm : les serveurs ouvrent une fenêtre xterm et les messages sont affichés dans cette fenêtre
---modules=module1,module2,... : où modulen est le nom d'un module Salome à charger dans le catalogue
+--xterm : les serveurs ouvrent une fen�tre xterm et les messages sont affich�s dans cette fen�tre
+--modules=module1,module2,... : o� modulen est le nom d'un module Salome � charger dans le catalogue
--containers=cpp,python,superv: lancement des containers cpp, python et de supervision
---killall : arrêt des serveurs de salome
+--killall : arr�t des serveurs de salome
- La variable d'environnement <modulen>_ROOT_DIR doit etre préalablement
- positionnée (modulen doit etre en majuscule).
+ La variable d'environnement <modulen>_ROOT_DIR doit etre pr�alablement
+ positionn�e (modulen doit etre en majuscule).
KERNEL_ROOT_DIR est obligatoire.
"""
# -----------------------------------------------------------------------------
#
-# Fonction d'arrêt de salome
+# Fonction d'arr�t de salome
#
def killSalome():
# -----------------------------------------------------------------------------
#
-# Vérification des variables d'environnement
+# V�rification des variables d'environnement
#
try:
kernel_root_dir=os.environ["KERNEL_ROOT_DIR"]
# il faut KERNEL en premier dans la liste des modules
# - l'ordre des modules dans le catalogue sera identique
-# - la liste des modules presents dans le catalogue est exploitée pour charger les modules CORBA python,
+# - la liste des modules presents dans le catalogue est exploit�e pour charger les modules CORBA python,
# il faut charger les modules python du KERNEL en premier
if "KERNEL" in liste_modules:liste_modules.remove("KERNEL")
# -----------------------------------------------------------------------------
#
-# Définition des classes d'objets pour le lancement des Server CORBA
+# D�finition des classes d'objets pour le lancement des Server CORBA
#
class Server:
RegistryServer().run()
#
- # Attente de la disponibilité du Registry dans le Naming Service
+ # Attente de la disponibilit� du Registry dans le Naming Service
#
clt.waitNS("/Registry")
cataServer.run()
#
- # Attente de la disponibilité du Catalog Server dans le Naming Service
+ # Attente de la disponibilit� du Catalog Server dans le Naming Service
#
import SALOME_ModuleCatalog
clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
#
- # Attente de la disponibilité du SalomeDS dans le Naming Service
+ # Attente de la disponibilit� du SalomeDS dans le Naming Service
#
- clt.waitNS("/myStudyManager")
+ clt.waitNS("/Study")
#
# Lancement Session Server
SessionServer().run()
#
- # Attente de la disponibilité du Session Server dans le Naming Service
+ # Attente de la disponibilit� du Session Server dans le Naming Service
#
import SALOME
session=clt.waitNS("/Kernel/Session",SALOME.Session)
if with_container_cpp:
ContainerCPPServer().run()
#
- # Attente de la disponibilité du Container C++ local
+ # Attente de la disponibilit� du Container C++ local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/FactoryServer")
if with_container_python:
ContainerPYServer().run()
#
- # Attente de la disponibilité du Container Python local
+ # Attente de la disponibilit� du Container Python local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy")
#
ContainerSUPERVServer().run()
#
- # Attente de la disponibilité du Container Supervision local
+ # Attente de la disponibilit� du Container Supervision local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer")
Sauvegarde du dictionnaire des process dans , %s
Pour tuer les process SALOME, executer : python killSalome.py depuis
une console, ou bien killSalome() depuis le present interpreteur,
-s'il n'est pas fermé.
+s'il n'est pas ferm�.
runSalome, avec l'option --killall, commence par tuer les process restants
-d'une execution précédente.
+d'une execution pr�c�dente.
Pour lancer uniquement le GUI, executer startGUI() depuis le present interpreteur,
-s'il n'est pas fermé.
+s'il n'est pas ferm�.
""" % filedict
--help : affichage de l'aide
--gui : lancement du GUI
--logger : redirection des messages dans un fichier
---xterm : les serveurs ouvrent une fenêtre xterm et les messages sont affichés dans cette fenêtre
---modules=module1,module2,... : où modulen est le nom d'un module Salome à charger dans le catalogue
+--xterm : les serveurs ouvrent une fen�tre xterm et les messages sont affich�s dans cette fen�tre
+--modules=module1,module2,... : o� modulen est le nom d'un module Salome � charger dans le catalogue
--containers=cpp,python,superv: lancement des containers cpp, python et de supervision
---killall : arrêt des serveurs de salome
+--killall : arr�t des serveurs de salome
- La variable d'environnement <modulen>_ROOT_DIR doit etre préalablement
- positionnée (modulen doit etre en majuscule).
+ La variable d'environnement <modulen>_ROOT_DIR doit etre pr�alablement
+ positionn�e (modulen doit etre en majuscule).
KERNEL_ROOT_DIR est obligatoire.
"""
# -----------------------------------------------------------------------------
#
-# Fonction d'arrêt de salome
+# Fonction d'arr�t de salome
#
def killSalome():
# -----------------------------------------------------------------------------
#
-# Vérification des variables d'environnement
+# V�rification des variables d'environnement
#
try:
kernel_root_dir=os.environ["KERNEL_ROOT_DIR"]
# il faut KERNEL en premier dans la liste des modules
# - l'ordre des modules dans le catalogue sera identique
-# - la liste des modules presents dans le catalogue est exploitée pour charger les modules CORBA python,
+# - la liste des modules presents dans le catalogue est exploit�e pour charger les modules CORBA python,
# il faut charger les modules python du KERNEL en premier
if "KERNEL" in liste_modules:liste_modules.remove("KERNEL")
# -----------------------------------------------------------------------------
#
-# Définition des classes d'objets pour le lancement des Server CORBA
+# D�finition des classes d'objets pour le lancement des Server CORBA
#
class Server:
RegistryServer().run()
#
- # Attente de la disponibilité du Registry dans le Naming Service
+ # Attente de la disponibilit� du Registry dans le Naming Service
#
clt.waitNS("/Registry")
cataServer.run()
#
- # Attente de la disponibilité du Catalog Server dans le Naming Service
+ # Attente de la disponibilit� du Catalog Server dans le Naming Service
#
import SALOME_ModuleCatalog
clt.waitNS("/Kernel/ModulCatalog",SALOME_ModuleCatalog.ModuleCatalog)
#
- # Attente de la disponibilité du SalomeDS dans le Naming Service
+ # Attente de la disponibilit� du SalomeDS dans le Naming Service
#
- clt.waitNS("/myStudyManager")
+ clt.waitNS("/Study")
#
# Lancement Session Server
SessionServer().run()
#
- # Attente de la disponibilité du Session Server dans le Naming Service
+ # Attente de la disponibilit� du Session Server dans le Naming Service
#
import SALOME
session=clt.waitNS("/Kernel/Session",SALOME.Session)
if with_container_cpp:
ContainerCPPServer().run()
#
- # Attente de la disponibilité du Container C++ local
+ # Attente de la disponibilit� du Container C++ local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/FactoryServer")
if with_container_python:
ContainerPYServer().run()
#
- # Attente de la disponibilité du Container Python local
+ # Attente de la disponibilit� du Container Python local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/FactoryServerPy")
#
ContainerSUPERVServer().run()
#
- # Attente de la disponibilité du Container Supervision local
+ # Attente de la disponibilit� du Container Supervision local
# dans le Naming Service
#
clt.waitNS("/Containers/" + theComputer + "/SuperVisionContainer")
Sauvegarde du dictionnaire des process dans , %s
Pour tuer les process SALOME, executer : python killSalome.py depuis
une console, ou bien killSalome() depuis le present interpreteur,
-s'il n'est pas fermé.
+s'il n'est pas ferm�.
runSalome, avec l'option --killall, commence par tuer les process restants
-d'une execution précédente.
+d'une execution pr�c�dente.
Pour lancer uniquement le GUI, executer startGUI() depuis le present interpreteur,
-s'il n'est pas fermé.
+s'il n'est pas ferm�.
""" % filedict
-->
<proc name="proc">
- <property name="DefaultStudyID" value="1"/>
<type name="bool" kind="bool"/>
<type name="double" kind="double"/>
<type name="string" kind="string"/>
<property name="workingdir" value=""/>
</container>
<datanode name="StudyInNode0" kind="study">
- <property name="StudyID" value="1"/>
<parameter name="a" type="GEOM_Object" ref="/Geometry/Box_1"/>
<parameter name="b" type="GEOM_Object" ref="/Geometry/Sphere_1"/>
</datanode>
<outport name="return" type="GEOM_Object"/>
</service>
<outnode name="StudyOutNode0" kind="study">
- <property name="StudyID" value="1"/>
<parameter name="a" type="GEOM_Object" ref="/Geometry/YacsFuse"/>
</outnode>
- <service name="SalomeNode1">
- <node>SalomeNode0</node>
- <method>SetStudyID</method>
- <inport name="theStudyID" type="Int"/>
- </service>
<control> <fromnode>StudyInNode0</fromnode> <tonode>PyScript0</tonode> </control>
- <control> <fromnode>StudyInNode0</fromnode> <tonode>SalomeNode1</tonode> </control>
<control> <fromnode>PyScript0</fromnode> <tonode>SalomeNode0</tonode> </control>
<control> <fromnode>SalomeNode0</fromnode> <tonode>StudyOutNode0</tonode> </control>
- <control> <fromnode>SalomeNode1</fromnode> <tonode>SalomeNode0</tonode> </control>
<datalink control="false">
<fromnode>StudyInNode0</fromnode> <fromport>a</fromport>
<tonode>PyScript0</tonode> <toport>a</toport>
<fromnode>SalomeNode0</fromnode> <fromport>return</fromport>
<tonode>StudyOutNode0</tonode> <toport>a</toport>
</datalink>
- <parameter>
- <tonode>SalomeNode1</tonode><toport>theStudyID</toport>
- <value><int>1</int></value>
- </parameter>
</proc>
-->
<proc name="proc">
- <property name="DefaultStudyID" value="1"/>
<objref name="CALCIUM_integer" id="IDL:CALCIUM_integer:1.0"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="schema">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="Schema">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="Schema">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<!--nodes -->
<datanode name="s" kind="study" >
- <property name="StudyID" value="1" />
<parameter name="b" type="FIELDDOUBLE" ref="0:1:1:3:2:1"/>
</datanode>
<datanode name="d" >
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="optim">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="TestDistPython2">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
-->
<proc name="TestDistPython2">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<code>orb = CORBA.ORB_init([], CORBA.ORB_ID)</code>
<code>lcc = LifeCycleCORBA(orb)</code>
<code>naming_service = SALOME_NamingServicePy_i(orb)</code>
- <code>StudyManager = naming_service.Resolve('myStudyManager')</code>
+ <code>aStudy = naming_service.Resolve('Study')</code>
<code>aVisu = lcc.FindOrLoadComponent("FactoryServer","VISU")</code>
- <code>aStudy = StudyManager.GetStudyByID(1)</code>
<code>aVisu.SetCurrentStudy(aStudy)</code>
<code>aViewManager=aVisu.GetViewManager()</code>
<code>aView=aViewManager.Create3DView()</code>
<inport name="box" type="GEOM_Object"/>
<outport name="box" type="GEOM_Object"/>
</service>
- <service name="node51" >
- <component>GEOM_Superv</component>
- <method>SetStudyID</method>
- <inport name="id" type="int"/>
- </service>
<service name="node52" >
<component>PYHELLO</component>
<method>makeBanner</method>
<control> <fromnode>node5</fromnode> <tonode>node62</tonode> </control>
<control> <fromnode>node5</fromnode> <tonode>node63</tonode> </control>
<control> <fromnode>node13</fromnode> <tonode>node14</tonode> </control>
- <control> <fromnode>node44</fromnode> <tonode>node51</tonode> </control>
- <control> <fromnode>node51</fromnode> <tonode>node49</tonode> </control>
<control> <fromnode>node49</fromnode> <tonode>node50</tonode> </control>
<control> <fromnode>node36</fromnode> <tonode>node37</tonode> </control>
<!-- datalinks -->
<parameter><tonode>node37</tonode><toport>p4</toport><value><string>vitesse</string></value></parameter>
<parameter><tonode>node37</tonode><toport>p5</toport><value><double>0.</double></value></parameter>
<parameter><tonode>node52</tonode><toport>nom</toport><value><string>toto</string></value></parameter>
-<parameter><tonode>node51</tonode><toport>id</toport><value><int>1</int></value></parameter>
<parameter><tonode>node49</tonode> <toport>x1</toport><value><double>0</double></value></parameter>
<parameter><tonode>node49</tonode> <toport>y1</toport><value><double>0</double></value></parameter>
<parameter><tonode>node49</tonode> <toport>z1</toport><value><double>0</double></value></parameter>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<?xml version='1.0' encoding='iso-8859-1' ?>
<proc name="newSchema_1">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>
<!--nodes -->
<datanode name="s" kind="study" >
- <property name="StudyID" value="1" />
<parameter name="b" type="GEOM/GEOM_Object" ref="0:1:2:2"/>
<parameter name="c" type="bool" ref="/Geometry/Box_1"/>
</datanode>
</inline>
<outnode name="os" kind="study" ref="stud1.hdf" >
- <property name="StudyID" value="3" />
<parameter name="b" type="GEOM/GEOM_Object" ref="/Save/x"/>
<!-- <parameter name="c" type="GEOM/GEOM_Object" ref="/Geometry/Box_2"/>
<parameter name="b" type="GEOM/GEOM_Object" ref="0:1:1:6"/>
-->
<proc name="proc">
- <property name="DefaultStudyID" value="1"/>
<type name="string" kind="string"/>
<struct name="Engines/dataref">
<member name="ref" type="string"/>