Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs =================================================================== diff -u -r900 -r916 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 900) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/DamMacroStabilityInwards/DamMacroStabilityInwardsKernelWrapper.cs (.../DamMacroStabilityInwardsKernelWrapper.cs) (revision 916) @@ -79,21 +79,24 @@ model = MStabModelType.Bishop; } -// //ToDo zant tmp Set input for TestRunMacroStabilityTutorialDesign (start) -// //DGeoStabilityExePath, ProjectWorkingPath and SoildatabaseName are not specified in xml from UI -// FailureMechanismParametersMStab.DGeoStabilityExePath = @".\KernelWrappers\DamMacroStabilityCommon\DGeoStability.exe"; -// var absoluteFolder = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory())); -// var workingDir = Path.Combine(absoluteFolder, "TestOutStab"); -// FailureMechanismParametersMStab.ProjectWorkingPath = workingDir; -// var soilDB = @"TestFiles\DAM Tutorial Design0.soilmaterials.mdb"; -// damKernelInput.Location.SoildatabaseName = soilDB; -// //MapForSoilGeometries2D has not path in xml. Where is it located? Always in ProjectWorkingPath? -// var soilGeometry2DName = damKernelInput.SubSoilScenario.StiFileName; -// var soilGeometry2DFolder = Path.Combine("TestFiles", -// damKernelInput.Location.StabilityOptions.MapForSoilGeometries2D); -// damKernelInput.SubSoilScenario.StiFileName = Path.Combine(soilGeometry2DFolder, soilGeometry2DName); -// //XSoilGeometry2DOrigin is not specified in xml from UI -// damKernelInput.DesignScenario.Location.XSoilGeometry2DOrigin = -8.42; + FailureMechanismParametersMStab.DGeoStabilityExePath = @".\KernelWrappers\DamMacroStabilityCommon\DGeoStability.exe"; + + if (string.IsNullOrEmpty(damKernelInput.WorkingDir)) + { + FailureMechanismParametersMStab.ProjectWorkingPath = Directory.GetCurrentDirectory(); + } + else + { + FailureMechanismParametersMStab.ProjectWorkingPath = damKernelInput.WorkingDir; + } + + damKernelInput.SubSoilScenario.StiFileName = + Path.Combine(damKernelInput.Location.StabilityOptions.MapForSoilGeometries2D, + damKernelInput.SubSoilScenario.StiFileName); + + //ToDo zant tmp Set input for TestRunMacroStabilityTutorialDesign (start) + //XSoilGeometry2DOrigin is not specified in xml from UI + //damKernelInput.DesignScenario.Location.XSoilGeometry2DOrigin = -8.42; // //ToDo zant tmp Set input for TestRunMacroStabilityTutorialDesign (end) var damMacroStabilityInput = new DamMacroStabilityInput()