ResourceLeveler.LevelAll

ResourceLeveler.LevelAll method

Levels tasks for all project’s resources using default leveling options.

public static LevelingResult LevelAll(Project project)
ParameterTypeDescription
projectProjectProject to apply resource leveling.

Return Value

Object containing results of resource leveling.

Examples

Shows how to level all project’s resources using default options.

var project = new Project(DataDir + "Software Development Plan.mpp");

var levelingResult = ResourceLeveler.LevelAll(project);

foreach (var task in levelingResult.AffectedTasks)
{
    Console.WriteLine("Task affected by the leveling operation: " + task.Name);
}

project.Save(OutDir + "Software Development Plan.leveled.mpp");
ResourceLeveler.ClearLeveling(project);

Console.WriteLine("Leveling cleared");

See Also