Index: DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs =================================================================== diff -u -r4070 -r4377 --- DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 4070) +++ DamClients/DamUI/trunk/src/DamClientsLibrary/Deltares.Dam.Data/DamEngineIo/FillDamUiFromXmlOutput.cs (.../FillDamUiFromXmlOutput.cs) (revision 4377) @@ -28,6 +28,7 @@ using Deltares.Geotechnics.Soils; using Deltares.Geotechnics.SurfaceLines; using Deltares.Mathematics; +using Deltares.Standard; using Deltares.Standard.EventPublisher; using Deltares.Standard.Logging; using SurfaceLine = Deltares.DamEngine.Io.XmlOutput.SurfaceLine; @@ -141,6 +142,10 @@ for (var i = 0; i < output.Results.CalculationResults.Length; i++) { DesignResult designResult = output.Results.CalculationResults[i]; + if (string.IsNullOrEmpty(designResult.BaseFileName)) + { + designResult.BaseFileName = "Loc(" + designResult.LocationName + ")_Prof(" + designResult.ProfileName + ")_Scen(" + designResult.ScenarioName + ")"; + } var desResult = new CsvExportData(designResult.LocationName, designResult.ScenarioName) { DamFailureMechanismeCalculation = damProjectData.DamProjectCalculationSpecification.CurrentSpecification, // vanuit invoer @@ -212,26 +217,6 @@ desResult.BlighHCritical = designResult.PipingDesignResults.BlighHcritical; } - if (designResult.PipingDesignResults.Sellmeijer4ForcesFactorSpecified) - { - desResult.Sellmeijer4ForcesPipingFactor = designResult.PipingDesignResults.Sellmeijer4ForcesFactor; - } - - if (designResult.PipingDesignResults.Sellmeijer4ForcesHcriticalSpecified) - { - desResult.Sellmeijer4ForcesHCritical = designResult.PipingDesignResults.Sellmeijer4ForcesHcritical; - } - - if (designResult.PipingDesignResults.SellmeijerVnkFactorSpecified) - { - desResult.SellmeijerPipingFactor = designResult.PipingDesignResults.SellmeijerVnkFactor; - } - - if (designResult.PipingDesignResults.SellmeijerVnkHcriticalSpecified) - { - desResult.SellmeijerHCritical = designResult.PipingDesignResults.SellmeijerVnkHcritical; - } - if (designResult.PipingDesignResults.Wti2017BackwardErosionFactorSpecified) { desResult.Wti2017BackwardErosionSafetyFactor = designResult.PipingDesignResults.Wti2017BackwardErosionFactor; @@ -508,7 +493,8 @@ } } - if (string.IsNullOrEmpty(desResult.CalculationSubDir)) + if (string.IsNullOrEmpty(desResult.CalculationSubDir) && (desResult.CalculationResult != CalculationResult.RunFailed) && + (desResult.CalculationResult != CalculationResult.UnexpectedError)) { throw new NullReferenceException(nameof(desResult.CalculationSubDir) + " is null"); } @@ -518,7 +504,11 @@ throw new NullReferenceException(nameof(desResult.BaseFileName) + " is null"); } - desResult.CreateResultsFileForSurfaceLineAndProfile(desResult.DesignResultFile); + if ((desResult.CalculationResult != CalculationResult.RunFailed) && + (desResult.CalculationResult != CalculationResult.UnexpectedError)) + { + desResult.CreateResultsFileForSurfaceLineAndProfile(desResult.DesignResultFile); + } } private static void ResetUpliftValues(CsvExportData desResult)