From 293f005fa7fd4be6f626ecbc641e32625a3fb41b Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Mon, 21 Mar 2022 14:48:52 +0100 Subject: [PATCH] fin modif pour projection cata-edg-rn --- Accas/A_SIMP.py | 4 ++-- InterfaceQT4/editorSsIhm.py | 9 +++++++++ InterfaceQT4/readercata.py | 7 ++++++- ReacteurNumerique/getDicoPython.py | 5 +++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Accas/A_SIMP.py b/Accas/A_SIMP.py index 59c5f444..6b44672c 100644 --- a/Accas/A_SIMP.py +++ b/Accas/A_SIMP.py @@ -26,7 +26,7 @@ from Efi2Xsd.AccasXsd import X_SIMP class SIMP(N_SIMP.SIMP,X_SIMP,I_ENTITE.ENTITE): class_instance=A_MCSIMP.MCSIMP def __init__(self,*tup,**args): - #print tup - #print args + #print (tup) + #print (args) I_ENTITE.ENTITE.__init__(self) N_SIMP.SIMP.__init__(self,*tup,**args) diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index 55530f30..766341d3 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -840,6 +840,15 @@ class JDCEditorSsIhm : monMC.state='changed' return 1 + def dumpXsd(self, avecEltAbstrait = False): + #-----------------------------------------# + texteXSD = self.readercata.cata.JdC.dumpXsd(avecEltAbstrait) + return texteXSD + + def dumpStructure(self): + #----------------------------# + texteStructure = self.readercata.cata.JdC.dumpStructure() + return texteStructure #-------------------------------------# def changeDefautDefMC(self,nomEtape,listeMC,valeurs): diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 05d942d9..226d31c9 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -242,6 +242,7 @@ class ReaderCata (ReaderCataCommun): self.cata = self.importCata(self.fichierCata) if self.code == 'NonConnu' : self.code = self.cata.JdC.code modeleMetier = None + self.cata.fileModeleMetier = None dicoEltDif = {} if not (self.appliEficas.genereXSD) : if (self.appliEficas.maConfiguration.withXSD or self.appliEficas.withXSD) : @@ -254,7 +255,11 @@ class ReaderCata (ReaderCataCommun): nomCataXsd = os.path.splitext(os.path.basename(self.fichierCata))[0] fichierCataTrunc=os.path.splitext(os.path.basename(self.fichierCata))[0] nomCataXsd = fichierCataTrunc+'_driver' - pathCata = os.path.dirname(self.fichierCata)+'/raw/'+nomCataXsd+'.py' + + if os.path.dirname(self.fichierCata) == "" : pathCata ='./raw/'+nomCataXsd+'.py' + else : pathCata = os.path.dirname(self.fichierCata)+'/raw/'+nomCataXsd+'.py' + + self.cata.fileModeleMetier= os.path.dirname(self.fichierCata)+'/raw/'+nomCataXsd+'.xsd' import imp modeleMetier= imp.load_source(nomCataXsd,pathCata) #print ('nomCataXsd , pathCata ',nomCataXsd,pathCata) diff --git a/ReacteurNumerique/getDicoPython.py b/ReacteurNumerique/getDicoPython.py index 34e3a540..c6f58810 100755 --- a/ReacteurNumerique/getDicoPython.py +++ b/ReacteurNumerique/getDicoPython.py @@ -6,9 +6,10 @@ import sys,os sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) from InterfaceQT4.eficas_go import getDicoPython -monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG_PN.py","edg_REP1300_FULL_PN.comm") +#monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG_PN.py","edg_REP1300_FULL_PN.comm") +monDico=getDicoPython("ReacteurNumerique","cata_RN_EDG_PN.py","/tmp/toto.comm") from pprint import pprint -print (monDico) +pprint (monDico) -- 2.39.2