diff --git a/src/PKSim.Core/Services/EventBuildingBlockCreator.cs b/src/PKSim.Core/Services/EventBuildingBlockCreator.cs index c393821d8..a2c8a41e5 100644 --- a/src/PKSim.Core/Services/EventBuildingBlockCreator.cs +++ b/src/PKSim.Core/Services/EventBuildingBlockCreator.cs @@ -148,13 +148,10 @@ private void addProtocol(CompoundProperties compoundProperties) eventGroup.SourceCriteria.Add(new MatchTagCondition(CoreConstants.Tags.EVENTS)); - var schemaItems = _schemaItemsMapper.MapFrom(protocol).ToList(); - var width = schemaItems.Count.ToString().Length; - - schemaItems.Each((schemaItem, index) => + _schemaItemsMapper.MapFrom(protocol).Each((schemaItem, index) => { - var number = (index + 1).ToString($"D{width}"); - var applicationName = $"{CoreConstants.APPLICATION_NAME_TEMPLATE}{number}"; + //+1 to start at 1 for the nomenclature + var applicationName = $"{CoreConstants.APPLICATION_NAME_TEMPLATE}{index + 1}"; addApplication(eventGroup, schemaItem, applicationName, compoundProperties, protocol); });