diff --git a/VectoCore/VectoCore/OutputData/SumDataFields.cs b/VectoCore/VectoCore/OutputData/SumDataFields.cs index 98c7a433833820eb1140bd82f464b84a9916fbd1..3a800968490ef87c2824e3ee1795a3a12977a10c 100644 --- a/VectoCore/VectoCore/OutputData/SumDataFields.cs +++ b/VectoCore/VectoCore/OutputData/SumDataFields.cs @@ -8,6 +8,7 @@ using TUGraz.VectoCommon.InputData; using TUGraz.VectoCommon.Models; using TUGraz.VectoCommon.Utils; using TUGraz.VectoCore.Configuration; +using TUGraz.VectoCore.InputData.FileIO.XML.Declaration.Interfaces; using TUGraz.VectoCore.Models.Declaration; using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -368,8 +369,16 @@ namespace TUGraz.VectoCore.OutputData return null; } - var gbxType = r.InputData?.JobInputData.Vehicle.Components?.GetGearboxType() ?? - r.InputData?.PrimaryVehicleData?.Vehicle.Components?.GetGearboxType(); + GearboxType? gbxType = null; + switch (r.InputData) { + case IMultistepBusInputDataProvider multistep: + gbxType = multistep.JobInputData?.PrimaryVehicle?.Vehicle?.Components.GetGearboxType(); + break; + default: + gbxType = r.InputData?.JobInputData.Vehicle.Components?.GetGearboxType() ?? + r.InputData?.PrimaryVehicleData?.Vehicle.Components?.GetGearboxType(); + break; + } if (gbxType != null) { ret = DeclarationData.ADASCombinations.Lookup(r.VehicleData.ADAS, gbxType.Value).ID;