-void HYDROData_Entity::findPythonReferenceObject( MapOfTreatedObjects& theTreatedObjects,
- QStringList& theScript ) const
+void HYDROData_Entity::findPythonReferenceObject( QStringList& theScript,
+ QString defName) const
+{
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ if ( aDocument.IsNull() )
+ return;
+
+ if (defName.isEmpty())
+ theScript << QString( "%1 = %2.FindObjectByName( \"%3\" )" ).arg( GetObjPyName() )
+ .arg( aDocument->GetDocPyName() )
+ .arg( GetDefaultName() );
+ else
+ theScript << QString( "%1 = %2.FindObjectByName( \"%3\" )" ).arg( GetObjPyName() )
+ .arg( aDocument->GetDocPyName() )
+ .arg( defName );
+}
+
+void HYDROData_Entity::SetNameInDumpPython(QStringList& theScript,
+ QString theName) const