private ICommand removeAdvancedParametersForMolecule(IndividualMolecule molecule, Population population) { var macroCommand = new PKSimMacroCommand { CommandType = PKSimConstants.Command.CommandTypeDelete, Description = PKSimConstants.Command.RemoveAdvancedParametersForMoleculeInPopulation(molecule.Name, population.Name) }; foreach (var parameter in molecule.GetAllChildren <IParameter>()) { var advancedParameter = population.AdvancedParameterFor(_entityPathResolver, parameter); if (advancedParameter != null) { macroCommand.AddCommand(new RemoveAdvancedParameterFromContainerCommand(advancedParameter, population, _executionContext).Run(_executionContext)); } } _executionContext.UpdateBuildingBlockPropertiesInCommand(macroCommand, population); return(macroCommand); }