From 0f7fdcf68bd30981816260817be4e48628b81f87 Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 31 Oct 2005 14:37:38 +0000 Subject: [PATCH] Fix for bug PAL10426 ( SAMPLES_SRC: some examples doesn't have the correct path ). --- Superv/Graphs/testvisu20_multi.xml | 2 +- Superv/Python/GraphEditGraphSwitchs.py | 20 +++-- Superv/Python/GraphErrMsgs.py | 106 ++++++++++++------------- Superv/Python/GraphStreamsXmlTest.py | 4 +- Superv/Python/GraphTestMacroNodes.py | 16 ++-- Superv/Python/InLine_Nut.py | 4 +- Superv/Python/testvisu20_multi.py | 2 +- 7 files changed, 83 insertions(+), 71 deletions(-) diff --git a/Superv/Graphs/testvisu20_multi.xml b/Superv/Graphs/testvisu20_multi.xml index 3023243..04e06c7 100644 --- a/Superv/Graphs/testvisu20_multi.xml +++ b/Superv/Graphs/testvisu20_multi.xml @@ -127,7 +127,7 @@ aView ", aView ]]> - + myResult ", myResult ]]> diff --git a/Superv/Python/GraphEditGraphSwitchs.py b/Superv/Python/GraphEditGraphSwitchs.py index 9894dae..cd18539 100644 --- a/Superv/Python/GraphEditGraphSwitchs.py +++ b/Superv/Python/GraphEditGraphSwitchs.py @@ -7,7 +7,8 @@ GraphEditSwitchs = GraphSwitchs exec GraphEditSwitchs.ListNodes() InitLoopSwitch.destroy() -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_1.py') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_1.py' +GraphEditSwitchs.Export( aPyFile ) InitLoop.SetName('InitLoopSwitch') InitLoopSwitch = InitLoop @@ -22,7 +23,8 @@ GraphEditSwitchs.Link( OInitLoopSwitchIndex , ISwitcha ) exec EndOfInitLoopSwitch.ListPorts() IEndOfInitLoopSwitchIndex.Link().destroy() -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_2.py') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_2.py' +GraphEditSwitchs.Export( aPyFile ) exec EndOfSwitch.ListPorts() GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopSwitchIndex) @@ -30,7 +32,8 @@ GraphEditSwitchs.Link(OEndOfSwitcha,IEndOfInitLoopSwitchIndex) exec EndSwitch.ListPorts() GraphEditSwitchs.Link(OEndSwitchGate,IEndOfInitLoopSwitchGate) -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_3.py') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py' +GraphEditSwitchs.Export( aPyFile ) IsOdd_1.SetName('IsEven') IsEven = IsOdd_1 @@ -43,24 +46,27 @@ IIsEvenGate.Link().destroy() exec Switch_1.ListPorts() GraphEditSwitchs.Link(OSwitch_1Even,IIsEvenGate) -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_4.py') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_4.py' +GraphEditSwitchs.Export( aPyFile ) GraphEditSwitchs.PrintLinks() L = GraphEditSwitchs.Link(OSwitch_1Even,IEndSwitchDefault) L.destroy() -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_5.py') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_5.py' +GraphEditSwitchs.Export( aPyFile ) GraphEditSwitchs.Link(OSwitch_1Default,IEndSwitchDefault) GraphEditSwitchs.Link(OSwitch_1a,IIsEvena) -GraphEditSwitchs.Export('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_5.py') +GraphEditSwitchs.Export( aPyFile) Switch_1.SetName('') from SuperV import * -GraphEditSwitchs = Graph('/sal_01/salome/SalomePALHead_15_11_2004/SUPERV_SRC/examples/GraphEditGraphSwitchs_3.xml') +aPyFile = os.getenv('DATA_DIR') + '/Superv/Python/GraphEditGraphSwitchs_3.py' +GraphEditSwitchs = Graph( aPyFile ) diff --git a/Superv/Python/GraphErrMsgs.py b/Superv/Python/GraphErrMsgs.py index f1075b3..92a1e15 100644 --- a/Superv/Python/GraphErrMsgs.py +++ b/Superv/Python/GraphErrMsgs.py @@ -2,7 +2,7 @@ from SuperV import * GraphErrMsgs = Graph( "GraphErrMsgs" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/SyrStruct.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml' GraphErrMsgs.Import( anXmlFile ) @@ -86,7 +86,7 @@ from SuperV import * # GraphBadInputInLoop GraphBadInputInLoop = Graph( "GraphBadInputInLoop" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadInputInLoop.xml' GraphBadInputInLoop.Import( anXmlFile ) @@ -108,7 +108,7 @@ from SuperV import * # GraphBadInputInLoop1 GraphBadInputInLoop1 = Graph( "GraphBadInputInLoop1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadInputInLoop1.xml' GraphBadInputInLoop1.Import( anXmlFile ) @@ -130,7 +130,7 @@ from SuperV import * # GraphBadInputInLoop2 GraphBadInputInLoop2 = Graph( "GraphBadInputInLoop2" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop2.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadInputInLoop2.xml' GraphBadInputInLoop2.Import( anXmlFile ) @@ -152,7 +152,7 @@ from SuperV import * # GraphBadInputInLoop3 GraphBadInputInLoop3 = Graph( "GraphBadInputInLoop3" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadInputInLoop3.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadInputInLoop3.xml' GraphBadInputInLoop3.Import( anXmlFile ) @@ -174,7 +174,7 @@ from SuperV import * # GraphBadOutputOfLoop GraphBadOutputOfLoop = Graph( "GraphBadOutputOfLoop" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadOutputOfLoop.xml' GraphBadOutputOfLoop.Import( anXmlFile ) @@ -196,7 +196,7 @@ from SuperV import * # GraphBadOutputOfLoop1 GraphBadOutputOfLoop1 = Graph( "GraphBadOutputOfLoop1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadOutputOfLoop1.xml' GraphBadOutputOfLoop1.Import( anXmlFile ) @@ -218,7 +218,7 @@ from SuperV import * # GraphBadOutputOfLoop2 GraphBadOutputOfLoop2 = Graph( "GraphBadOutputOfLoop2" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphBadOutputOfLoop2.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphBadOutputOfLoop2.xml' GraphBadOutputOfLoop2.Import( anXmlFile ) @@ -240,7 +240,7 @@ from SuperV import * # GraphConvertObjRefCheckNotCompatible GraphConvertObjRefCheckNotCompatible = Graph( "GraphConvertObjRefCheckNotCompatible" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphConvertObjRefCheckNotCompatible.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphConvertObjRefCheckNotCompatible.xml' GraphConvertObjRefCheckNotCompatible.Import( anXmlFile ) @@ -263,7 +263,7 @@ from SuperV import * # GraphWrongPythonFunctions GraphWrongPythonFunctions = Graph( "GraphWrongPythonFunctions" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphWrongPythonFunctions.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphWrongPythonFunctions.xml' GraphWrongPythonFunctions.Import( anXmlFile ) @@ -285,7 +285,7 @@ from SuperV import * # GraphWrongContainerOrComponent GraphWrongContainerOrComponent = Graph( "GraphWrongContainerOrComponent" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphWrongContainerOrComponent.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphWrongContainerOrComponent.xml' GraphWrongContainerOrComponent.Import( anXmlFile ) @@ -307,7 +307,7 @@ from SuperV import * # GraphLoopSwitchDefaultAborted GraphLoopSwitchDefaultAborted = Graph( "GraphLoopSwitchDefaultAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchDefaultAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchDefaultAborted.xml' GraphLoopSwitchDefaultAborted.Import( anXmlFile ) @@ -329,7 +329,7 @@ from SuperV import * # GraphLoopSwitchOfSwitchAborted GraphLoopSwitchOfSwitchAborted = Graph( "GraphLoopSwitchOfSwitchAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchOfSwitchAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchOfSwitchAborted.xml' GraphLoopSwitchOfSwitchAborted.Import( anXmlFile ) @@ -351,7 +351,7 @@ from SuperV import * # GraphLoopSwitchOfSwitchNOTValid GraphLoopSwitchOfSwitchNOTValid = Graph( "GraphLoopSwitchOfSwitchNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchOfSwitchNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchOfSwitchNOTValid.xml' GraphLoopSwitchOfSwitchNOTValid.Import( anXmlFile ) @@ -372,7 +372,7 @@ from SuperV import * # GraphLoopSwitchsAborted GraphLoopSwitchsAborted = Graph( "GraphLoopSwitchsAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchsAborted.xml' GraphLoopSwitchsAborted.Import( anXmlFile ) @@ -394,7 +394,7 @@ from SuperV import * # GraphLoopSwitchsBranchesDefaultAborted GraphLoopSwitchsBranchesDefaultAborted = Graph( "GraphLoopSwitchsBranchesDefaultAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsBranchesDefaultAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchsBranchesDefaultAborted.xml' GraphLoopSwitchsBranchesDefaultAborted.Import( anXmlFile ) @@ -416,7 +416,7 @@ from SuperV import * # GraphLoopSwitchsNOTValid GraphLoopSwitchsNOTValid = Graph( "GraphLoopSwitchsNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchsNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchsNOTValid.xml' GraphLoopSwitchsNOTValid.Import( anXmlFile ) @@ -437,7 +437,7 @@ from SuperV import * # GraphSwitchCheckBranch2NOTValid GraphSwitchCheckBranch2NOTValid = Graph( "GraphSwitchCheckBranch2NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckBranch2NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckBranch2NOTValid.xml' GraphSwitchCheckBranch2NOTValid.Import( anXmlFile ) @@ -458,7 +458,7 @@ from SuperV import * # GraphSwitchCheckDefault1NOTValid GraphSwitchCheckDefault1NOTValid = Graph( "GraphSwitchCheckDefault1NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault1NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault1NOTValid.xml' GraphSwitchCheckDefault1NOTValid.Import( anXmlFile ) @@ -479,7 +479,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid GraphSwitchCheckDefault2NOTValid = Graph( "GraphSwitchCheckDefault2NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid.xml' GraphSwitchCheckDefault2NOTValid.Import( anXmlFile ) @@ -500,7 +500,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid1 GraphSwitchCheckDefault2NOTValid1 = Graph( "GraphSwitchCheckDefault2NOTValid1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid1.xml' GraphSwitchCheckDefault2NOTValid1.Import( anXmlFile ) @@ -521,7 +521,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid2 GraphSwitchCheckDefault2NOTValid2 = Graph( "GraphSwitchCheckDefault2NOTValid2" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid2.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid2.xml' GraphSwitchCheckDefault2NOTValid2.Import( anXmlFile ) @@ -542,7 +542,7 @@ from SuperV import * # GraphSwitchCrash GraphSwitchCrash = Graph( "GraphSwitchCrash" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCrash.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCrash.xml' GraphSwitchCrash.Import( anXmlFile ) @@ -563,7 +563,7 @@ from SuperV import * # GraphSwitchErrExec GraphSwitchErrExec = Graph( "GraphSwitchErrExec" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchErrExec.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchErrExec.xml' GraphSwitchErrExec.Import( anXmlFile ) @@ -584,7 +584,7 @@ from SuperV import * # GraphSwitchGatesNoDefaultAborted GraphSwitchGatesNoDefaultAborted = Graph( "GraphSwitchGatesNoDefaultAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchGatesNoDefaultAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchGatesNoDefaultAborted.xml' GraphSwitchGatesNoDefaultAborted.Import( anXmlFile ) @@ -605,7 +605,7 @@ from SuperV import * # GraphSwitchOutputNOTValid GraphSwitchOutputNOTValid = Graph( "GraphSwitchOutputNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchOutputNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchOutputNOTValid.xml' GraphSwitchOutputNOTValid.Import( anXmlFile ) @@ -626,7 +626,7 @@ from SuperV import * # GraphSyrControlAborted GraphSyrControlAborted = Graph( "GraphSyrControlAborted" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAborted.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAborted.xml' GraphSyrControlAborted.Import( anXmlFile ) @@ -647,7 +647,7 @@ from SuperV import * # GraphSyrControlAve GraphSyrControlAve = Graph( "GraphSyrControlAve" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAve.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAve.xml' GraphSyrControlAve.Import( anXmlFile ) @@ -671,7 +671,7 @@ from SuperV import * # GraphSyrControlAveValid GraphSyrControlAveValid = Graph( "GraphSyrControlAveValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAveValid.xml' GraphSyrControlAveValid.Import( anXmlFile ) @@ -695,7 +695,7 @@ from SuperV import * # GraphSyrControlAveExecutable GraphSyrControlAveExecutable = Graph( "GraphSyrControlAveExecutable" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveExecutable.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAveExecutable.xml' GraphSyrControlAveExecutable.Import( anXmlFile ) @@ -719,7 +719,7 @@ from SuperV import * # GraphSyrControlAveNOTValid GraphSyrControlAveNOTValid = Graph( "GraphSyrControlAveNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAveNOTValid.xml' GraphSyrControlAveNOTValid.Import( anXmlFile ) @@ -740,7 +740,7 @@ from SuperV import * # GraphSyrControlAveNOTValid1 GraphSyrControlAveNOTValid1 = Graph( "GraphSyrControlAveNOTValid1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSyrControlAveNOTValid1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSyrControlAveNOTValid1.xml' GraphSyrControlAveNOTValid1.Import( anXmlFile ) @@ -761,7 +761,7 @@ from SuperV import * # GraphSwitch GraphSwitch = Graph( "GraphSwitch" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitch.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitch.xml' GraphSwitch.Import( anXmlFile ) @@ -785,7 +785,7 @@ from SuperV import * # GraphSwitchExecutable GraphSwitchExecutable = Graph( "GraphSwitchExecutable" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchExecutable.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchExecutable.xml' GraphSwitchExecutable.Import( anXmlFile ) @@ -809,7 +809,7 @@ from SuperV import * # GraphSwitchNOTExecutable GraphSwitchNOTExecutable = Graph( "GraphSwitchNOTExecutable" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchNOTExecutable.xml' GraphSwitchNOTExecutable.Import( anXmlFile ) @@ -830,7 +830,7 @@ from SuperV import * # GraphSwitchNOTExecutable1 GraphSwitchNOTExecutable1 = Graph( "GraphSwitchNOTExecutable1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchNOTExecutable1.xml' GraphSwitchNOTExecutable1.Import( anXmlFile ) @@ -852,7 +852,7 @@ from SuperV import * # GraphSwitchNOTExecutable2 GraphSwitchNOTExecutable2 = Graph( "GraphSwitchNOTExecutable2" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchNOTExecutable2.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchNOTExecutable2.xml' GraphSwitchNOTExecutable2.Import( anXmlFile ) @@ -874,7 +874,7 @@ from SuperV import * # GraphSwitchBranchGates GraphSwitchBranchGates = Graph( "GraphSwitchBranchGates" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchBranchGates.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchBranchGates.xml' GraphSwitchBranchGates.Import( anXmlFile ) @@ -898,7 +898,7 @@ from SuperV import * # GraphInLinesUnValid GraphInLinesUnValid = Graph( "GraphInLinesUnValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphInLinesUnValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphInLinesUnValid.xml' GraphInLinesUnValid.Import( anXmlFile ) @@ -920,7 +920,7 @@ from SuperV import * # GraphSwitchCheckBranch2NOTValid GraphSwitchCheckBranch2NOTValid = Graph( "GraphSwitchCheckBranch2NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckBranch2NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckBranch2NOTValid.xml' GraphSwitchCheckBranch2NOTValid.Import( anXmlFile ) @@ -942,7 +942,7 @@ from SuperV import * # GraphSwitchCheckDefault1NOTValid GraphSwitchCheckDefault1NOTValid = Graph( "GraphSwitchCheckDefault1NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault1NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault1NOTValid.xml' GraphSwitchCheckDefault1NOTValid.Import( anXmlFile ) @@ -963,7 +963,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid GraphSwitchCheckDefault2NOTValid = Graph( "GraphSwitchCheckDefault2NOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid.xml' GraphSwitchCheckDefault2NOTValid.Import( anXmlFile ) @@ -986,7 +986,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid1 GraphSwitchCheckDefault2NOTValid1 = Graph( "GraphSwitchCheckDefault2NOTValid1" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid1.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid1.xml' GraphSwitchCheckDefault2NOTValid1.Import( anXmlFile ) @@ -1008,7 +1008,7 @@ from SuperV import * # GraphSwitchCheckDefault2NOTValid2 GraphSwitchCheckDefault2NOTValid2 = Graph( "GraphSwitchCheckDefault2NOTValid2" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchCheckDefault2NOTValid2.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchCheckDefault2NOTValid2.xml' GraphSwitchCheckDefault2NOTValid2.Import( anXmlFile ) @@ -1029,7 +1029,7 @@ from SuperV import * # GraphLoopsCoupled GraphLoopsCoupled = Graph( "GraphLoopsCoupled" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopsCoupled.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopsCoupled.xml' GraphLoopsCoupled.Import( anXmlFile ) @@ -1050,7 +1050,7 @@ from SuperV import * # GraphLoopGates GraphLoopGates = Graph( "GraphLoopGates" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopGates.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopGates.xml' GraphLoopGates.Import( anXmlFile ) @@ -1075,7 +1075,7 @@ from SuperV import * # GraphLoopGatesNOTValid GraphLoopGatesNOTValid = Graph( "GraphLoopGatesNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopGatesNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopGatesNOTValid.xml' GraphLoopGatesNOTValid.Import( anXmlFile ) @@ -1096,7 +1096,7 @@ from SuperV import * # GraphSwitchManyCases GraphSwitchManyCases = Graph( "GraphSwitchManyCases" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchManyCases.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchManyCases.xml' GraphSwitchManyCases.Import( anXmlFile ) @@ -1118,7 +1118,7 @@ from SuperV import * # GraphLoopTwoBranches GraphLoopTwoBranches = Graph( "GraphLoopTwoBranches" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopTwoBranches.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopTwoBranches.xml' GraphLoopTwoBranches.Import( anXmlFile ) @@ -1140,7 +1140,7 @@ from SuperV import * # GraphSwitchOutputNOTValid GraphSwitchOutputNOTValid = Graph( "GraphSwitchOutputNOTValid" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphSwitchOutputNOTValid.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphSwitchOutputNOTValid.xml' GraphSwitchOutputNOTValid.Import( anXmlFile ) @@ -1162,7 +1162,7 @@ from SuperV import * # GraphLoopSwitch GraphLoopSwitch = Graph( "GraphLoopSwitch" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitch.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitch.xml' GraphLoopSwitch.Import( anXmlFile ) @@ -1187,7 +1187,7 @@ from SuperV import * # GraphLoopSwitchGateDefault GraphLoopSwitchGateDefault = Graph( "GraphLoopSwitchGateDefault" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchGateDefault.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchGateDefault.xml' GraphLoopSwitchGateDefault.Import( anXmlFile ) @@ -1211,7 +1211,7 @@ from SuperV import * # GraphLoopSwitchGatesDefault GraphLoopSwitchGatesDefault = Graph( "GraphLoopSwitchGatesDefault" ) -anXmlFile = os.getenv('SUPERV_ROOT_DIR') + '/examples/GraphLoopSwitchGatesDefault.xml' +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphLoopSwitchGatesDefault.xml' GraphLoopSwitchGatesDefault.Import( anXmlFile ) diff --git a/Superv/Python/GraphStreamsXmlTest.py b/Superv/Python/GraphStreamsXmlTest.py index 37799a2..08aabab 100644 --- a/Superv/Python/GraphStreamsXmlTest.py +++ b/Superv/Python/GraphStreamsXmlTest.py @@ -47,7 +47,9 @@ except : from SuperV import * -GraphStreams = StreamGraph( '/home/Salome2/SUPERV_DataStream/SUPERV_SRC/examples/GraphStreams.xml') + +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphStreams.xml' +GraphStreams = StreamGraph( anXmlFile ) GraphStreams.PrintPorts() GraphStreams.PrintLinks() diff --git a/Superv/Python/GraphTestMacroNodes.py b/Superv/Python/GraphTestMacroNodes.py index ef35ea0..d025062 100644 --- a/Superv/Python/GraphTestMacroNodes.py +++ b/Superv/Python/GraphTestMacroNodes.py @@ -1,13 +1,15 @@ from SuperV import * -GraphMacroNodes = Graph( '/home/Salome2/Ecole_Ete_a6/SUPERV_install/examples/GraphEssai.xml' ) +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphEssai.xml' +GraphMacroNodes = Graph( anXmlFile ) GraphMacroNodes.PrintLinks() GraphMacroNodes.SetName('GraphMacroNodes') -Macro_SyrStruct = GraphMacroNodes.MNode( '/home/Salome2/Ecole_Ete_a6/SUPERV_install/examples/SyrStruct.xml' ) +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml' +Macro_SyrStruct = GraphMacroNodes.MNode( anXmlFile ) Macro_SyrStruct.PrintPorts() @@ -69,7 +71,8 @@ GraphMacroNodes.IsExecutable() GraphMacroNodes.PrintPorts() -Macro_SyrStruct_1 = GraphMacroNodes.MNode( '/home/Salome2/Ecole_Ete_a6/SUPERV_install/examples/SyrStruct.xml' ) +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/SyrStruct.xml' +Macro_SyrStruct_1 = GraphMacroNodes.MNode( anXmlFile ) Macro_SyrStruct_1.Print() @@ -93,8 +96,8 @@ MSyrStruct_1.Print() MSyrStruct_1.PrintPorts() - -GraphMacroNodes.Export( '/home/Salome2/Ecole_Ete_a6/SUPERV_build/examples/GraphMacroNodes.xml' ) +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml' +GraphMacroNodes.Export( anXmlFile ) SyrStruct.Name() SyrStruct_1.Name() @@ -115,7 +118,8 @@ Macro_SyrStruct_1.State() from SuperV import * -GraphMacroNodes = Graph( '/home/Salome2/Ecole_Ete_a6/SUPERV_build/examples/GraphMacroNodes.xml' ) +anXmlFile = os.getenv('DATA_DIR') + '/Superv/Graphs/GraphMacroNodes.xml' +GraphMacroNodes = Graph( anXmlFile ) GraphMacroNodes.Name() diff --git a/Superv/Python/InLine_Nut.py b/Superv/Python/InLine_Nut.py index 8a4f681..1924635 100755 --- a/Superv/Python/InLine_Nut.py +++ b/Superv/Python/InLine_Nut.py @@ -46,8 +46,8 @@ def Geometry(y1=50, y2=90): Chamfer_2 = MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 ) addToStudy(Chamfer_2, "Chamfer_2") #Import of the shape from "slots.brep" - thePath = os.getenv("KERNEL_ROOT_DIR") - theFileName = thePath + "/examples/slots.brep" + thePath = os.getenv("DATA_DIR") + theFileName = thePath + "/Shapes/Brep/slots.brep" theShapeForCut = ImportBREP(theFileName) addToStudy(theShapeForCut, "slot.brep_1") #Cut applying diff --git a/Superv/Python/testvisu20_multi.py b/Superv/Python/testvisu20_multi.py index 55c5c67..1c842fd 100644 --- a/Superv/Python/testvisu20_multi.py +++ b/Superv/Python/testvisu20_multi.py @@ -45,7 +45,7 @@ def DefTestVisu20_multi() : PyInitDisplay.append( ' #print "InitDisplay --> aView ", aView ' ) PyInitDisplay.append( ' #time.sleep(2) ' ) PyInitDisplay.append( ' medFile = "TimeStamps.med" ' ) - PyInitDisplay.append( ' medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFile ' ) + PyInitDisplay.append( ' medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFile ' ) PyInitDisplay.append( ' myResult = aVisu.ImportFile(medFile) ' ) PyInitDisplay.append( ' print "InitDisplay --> myResult ", myResult ' ) PyInitDisplay.append( ' return aVisu,myResult ' ) -- 2.30.2