Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs =================================================================== diff -u -r809 -r811 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 809) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 811) @@ -315,39 +315,42 @@ // Design options var designOptions = new LocationDesignOptions(); - designOptions.RedesignDikeHeight = location.RedesignDikeHeight; - designOptions.RedesignDikeShoulder = location.RedesignDikeShoulder; - designOptions.ShoulderEmbankmentMaterial = location.ShoulderEmbankmentMaterial; - designOptions.StabilityShoulderGrowSlope = location.StabilityShoulderGrowSlope; - designOptions.StabilityShoulderGrowDeltaX = location.StabilityShoulderGrowDeltaX; - designOptions.StabilitySlopeAdaptionDeltaX = location.StabilitySlopeAdaptionDeltaX; - designOptions.SlopeAdaptionStartCotangent = location.SlopeAdaptionStartCotangent; - designOptions.SlopeAdaptionEndCotangent = location.SlopeAdaptionEndCotangent; - designOptions.SlopeAdaptionStepCotangent = location.SlopeAdaptionStepCotangent; - designOptions.NewDikeTopWidthSpecified = true; - designOptions.NewDikeTopWidth = location.NewDikeTopWidth; - designOptions.NewDikeSlopeInsideSpecified = true; - designOptions.NewDikeSlopeInside = location.NewDikeSlopeInside; - designOptions.NewDikeSlopeInsideSpecified = true; - designOptions.NewDikeSlopeOutside = location.NewDikeSlopeOutside; - designOptions.NewDikeSlopeOutsideSpecified = true; - designOptions.NewShoulderTopSlope = location.NewShoulderTopSlope; - designOptions.NewShoulderTopSlopeSpecified = true; - designOptions.NewShoulderBaseSlope = location.NewShoulderBaseSlope; - designOptions.NewShoulderBaseSlopeSpecified = true; - designOptions.NewMaxHeightShoulderAsFraction = location.NewMaxHeightShoulderAsFraction; - designOptions.NewMaxHeightShoulderAsFractionSpecified = true; - designOptions.NewMinDistanceDikeToeStartDitch = location.NewMinDistanceDikeToeStartDitch; - designOptions.NewMinDistanceDikeToeStartDitchSpecified = true; - designOptions.UseNewDitchDefinition = location.UseNewDitchDefinition; - designOptions.NewWidthDitchBottomSpecified = true; - designOptions.NewWidthDitchBottom = location.NewWidthDitchBottom; - designOptions.NewSlopeAngleDitchSpecified = true; - designOptions.NewSlopeAngleDitch = location.NewSlopeAngleDitch; - designOptions.NewDepthDitchSpecified = true; - designOptions.NewDepthDitch = location.NewDepthDitch; - designOptions.StabilityDesignMethod = ConversionHelper.ConvertToInputStabilityDesignMethod(location.StabilityDesignMethod); - inputLocation.DesignOptions = designOptions; + if (designOptions != null) + { + designOptions.RedesignDikeHeight = location.RedesignDikeHeight; + designOptions.RedesignDikeShoulder = location.RedesignDikeShoulder; + designOptions.ShoulderEmbankmentMaterial = location.ShoulderEmbankmentMaterial; + designOptions.StabilityShoulderGrowSlope = location.StabilityShoulderGrowSlope; + designOptions.StabilityShoulderGrowDeltaX = location.StabilityShoulderGrowDeltaX; + designOptions.StabilitySlopeAdaptionDeltaX = location.StabilitySlopeAdaptionDeltaX; + designOptions.SlopeAdaptionStartCotangent = location.SlopeAdaptionStartCotangent; + designOptions.SlopeAdaptionEndCotangent = location.SlopeAdaptionEndCotangent; + designOptions.SlopeAdaptionStepCotangent = location.SlopeAdaptionStepCotangent; + designOptions.NewDikeTopWidthSpecified = true; + designOptions.NewDikeTopWidth = location.NewDikeTopWidth; + designOptions.NewDikeSlopeInsideSpecified = true; + designOptions.NewDikeSlopeInside = location.NewDikeSlopeInside; + designOptions.NewDikeSlopeInsideSpecified = true; + designOptions.NewDikeSlopeOutside = location.NewDikeSlopeOutside; + designOptions.NewDikeSlopeOutsideSpecified = true; + designOptions.NewShoulderTopSlope = location.NewShoulderTopSlope; + designOptions.NewShoulderTopSlopeSpecified = true; + designOptions.NewShoulderBaseSlope = location.NewShoulderBaseSlope; + designOptions.NewShoulderBaseSlopeSpecified = true; + designOptions.NewMaxHeightShoulderAsFraction = location.NewMaxHeightShoulderAsFraction; + designOptions.NewMaxHeightShoulderAsFractionSpecified = true; + designOptions.NewMinDistanceDikeToeStartDitch = location.NewMinDistanceDikeToeStartDitch; + designOptions.NewMinDistanceDikeToeStartDitchSpecified = true; + designOptions.UseNewDitchDefinition = location.UseNewDitchDefinition; + designOptions.NewWidthDitchBottomSpecified = true; + designOptions.NewWidthDitchBottom = location.NewWidthDitchBottom; + designOptions.NewSlopeAngleDitchSpecified = true; + designOptions.NewSlopeAngleDitch = location.NewSlopeAngleDitch; + designOptions.NewDepthDitchSpecified = true; + designOptions.NewDepthDitch = location.NewDepthDitch; + designOptions.StabilityDesignMethod = ConversionHelper.ConvertToInputStabilityDesignMethod(location.StabilityDesignMethod); + inputLocation.DesignOptions = designOptions; + } inputLocation.DesignScenarios = new LocationDesignScenario[location.Scenarios.Count]; for (int j = 0; j < location.Scenarios.Count; j++) Index: dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs =================================================================== diff -u -r810 -r811 --- dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 810) +++ dam clients/DamUI/trunk/src/Dam/Data/DamEngineIo/FillDamUiFromXmlInput.cs (.../FillDamUiFromXmlInput.cs) (revision 811) @@ -343,27 +343,30 @@ // Design options var designOptions = inputLocation.DesignOptions; - location.RedesignDikeHeight = designOptions.RedesignDikeHeight; - location.RedesignDikeShoulder = designOptions.RedesignDikeShoulder; - location.ShoulderEmbankmentMaterial = designOptions.ShoulderEmbankmentMaterial; - location.StabilityShoulderGrowSlope = designOptions.StabilityShoulderGrowSlope; - location.StabilityShoulderGrowDeltaX = designOptions.StabilityShoulderGrowDeltaX; - location.StabilitySlopeAdaptionDeltaX = designOptions.StabilitySlopeAdaptionDeltaX; - location.SlopeAdaptionStartCotangent = designOptions.SlopeAdaptionStartCotangent; - location.SlopeAdaptionEndCotangent = designOptions.SlopeAdaptionEndCotangent; - location.SlopeAdaptionStepCotangent = designOptions.SlopeAdaptionStepCotangent; - if (designOptions.NewDikeTopWidthSpecified) location.NewDikeTopWidth = designOptions.NewDikeTopWidth; - if (designOptions.NewDikeSlopeInsideSpecified) location.NewDikeSlopeInside = designOptions.NewDikeSlopeInside; - if (designOptions.NewDikeSlopeOutsideSpecified) location.NewDikeSlopeOutside = designOptions.NewDikeSlopeOutside; - if (designOptions.NewShoulderTopSlopeSpecified) location.NewShoulderTopSlope = designOptions.NewShoulderTopSlope; - if (designOptions.NewShoulderBaseSlopeSpecified) location.NewShoulderBaseSlope = designOptions.NewShoulderBaseSlope; - if (designOptions.NewMaxHeightShoulderAsFractionSpecified) location.NewMaxHeightShoulderAsFraction = designOptions.NewMaxHeightShoulderAsFraction; - if (designOptions.NewMinDistanceDikeToeStartDitchSpecified) location.NewMinDistanceDikeToeStartDitch = designOptions.NewMinDistanceDikeToeStartDitch; - location.UseNewDitchDefinition = designOptions.UseNewDitchDefinition; - if (designOptions.NewWidthDitchBottomSpecified) location.NewWidthDitchBottom = designOptions.NewWidthDitchBottom; - if (designOptions.NewSlopeAngleDitchSpecified) location.NewSlopeAngleDitch = designOptions.NewSlopeAngleDitch; - if (designOptions.NewDepthDitchSpecified) location.NewDepthDitch = designOptions.NewDepthDitch; - location.StabilityDesignMethod = ConversionHelper.ConvertToDamStabilityDesignMethod(designOptions.StabilityDesignMethod); + if (designOptions != null) + { + location.RedesignDikeHeight = designOptions.RedesignDikeHeight; + location.RedesignDikeShoulder = designOptions.RedesignDikeShoulder; + location.ShoulderEmbankmentMaterial = designOptions.ShoulderEmbankmentMaterial; + location.StabilityShoulderGrowSlope = designOptions.StabilityShoulderGrowSlope; + location.StabilityShoulderGrowDeltaX = designOptions.StabilityShoulderGrowDeltaX; + location.StabilitySlopeAdaptionDeltaX = designOptions.StabilitySlopeAdaptionDeltaX; + location.SlopeAdaptionStartCotangent = designOptions.SlopeAdaptionStartCotangent; + location.SlopeAdaptionEndCotangent = designOptions.SlopeAdaptionEndCotangent; + location.SlopeAdaptionStepCotangent = designOptions.SlopeAdaptionStepCotangent; + if (designOptions.NewDikeTopWidthSpecified) location.NewDikeTopWidth = designOptions.NewDikeTopWidth; + if (designOptions.NewDikeSlopeInsideSpecified) location.NewDikeSlopeInside = designOptions.NewDikeSlopeInside; + if (designOptions.NewDikeSlopeOutsideSpecified) location.NewDikeSlopeOutside = designOptions.NewDikeSlopeOutside; + if (designOptions.NewShoulderTopSlopeSpecified) location.NewShoulderTopSlope = designOptions.NewShoulderTopSlope; + if (designOptions.NewShoulderBaseSlopeSpecified) location.NewShoulderBaseSlope = designOptions.NewShoulderBaseSlope; + if (designOptions.NewMaxHeightShoulderAsFractionSpecified) location.NewMaxHeightShoulderAsFraction = designOptions.NewMaxHeightShoulderAsFraction; + if (designOptions.NewMinDistanceDikeToeStartDitchSpecified) location.NewMinDistanceDikeToeStartDitch = designOptions.NewMinDistanceDikeToeStartDitch; + location.UseNewDitchDefinition = designOptions.UseNewDitchDefinition; + if (designOptions.NewWidthDitchBottomSpecified) location.NewWidthDitchBottom = designOptions.NewWidthDitchBottom; + if (designOptions.NewSlopeAngleDitchSpecified) location.NewSlopeAngleDitch = designOptions.NewSlopeAngleDitch; + if (designOptions.NewDepthDitchSpecified) location.NewDepthDitch = designOptions.NewDepthDitch; + location.StabilityDesignMethod = ConversionHelper.ConvertToDamStabilityDesignMethod(designOptions.StabilityDesignMethod); + } dikeLocations.Add(location); }