#include <omnithread.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
+#include CORBA_SERVER_HEADER(MED_Gen)
// QT Includes
#include <qstring.h>
myStudyDocument = SALOMEDS::Study::_duplicate(theStudy);
ProcessVoidEvent(new TEvent(aStudyName));
+
+ // Load MED component if necessary
+ if(!myStudyDocument->FindComponent("MED")->_is_nil())
+ {
+ SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
+ Engines::Component_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","MED");
+ SALOME_MED::MED_Gen_var aMedEngine = SALOME_MED::MED_Gen::_narrow(aComponent);
+
+ if(!CORBA::is_nil(aMedEngine))
+ {
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+ aStudyBuilder->LoadWith( myStudyDocument->FindComponent( "MED" ), aMedEngine );
+ }
+ }
} else {
INFOS("CORBA::is_nil(theStudy)");
}