IMPLEMENT_STANDARD_HANDLE(HYDROData_Document,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared)
-#define PYTHON_DOC_NAME "doc"
+#define PYTHON_DOC_NAME "hydro_doc"
static const int UNDO_LIMIT = 10; // number of possible undo operations in the module
{
QString aDocName = PYTHON_DOC_NAME;
+ /*
int aDocId = 1;
if ( DocumentId( this, aDocId ) )
aDocName += "_" + QString::number( aDocId );
+ */
return aDocName;
}
aResScript << QString( "from HYDROPy import *" );
aResScript << QString( "from PyQt4.QtCore import *" );
aResScript << QString( "from PyQt4.QtGui import *" );
+ aResScript << QString( "import salome" );
aResScript << QString( "" );
- aResScript << QString( "%1 = HYDROData_Document.Document( %2 );" ).arg( aDocName ).arg( aDocId );
+ aResScript << QString( "%1 = HYDROData_Document.Document( salome.sg.getActiveStudyId() );" ).arg( aDocName );
return aResScript;
}