Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r809 -r813 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 809) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 813) @@ -348,27 +348,30 @@ location.PlLineOffsetBelowDikeToeAtPolder = waternetOptions.Pl1BelowToeDikePolderside; // 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); + } SurfaceLine2 surfaceLine = dikeSurfaceLines.First(n => n.Name.Equals(inputLocation.SurfaceLineName)); location.SurfaceLine = surfaceLine;