Table of contents
TOC
Réduire la table des matières
Développer la table des matières

Objet OverAllocatedAssignments (projet)OverAllocatedAssignments Object (Project)

office 365 dev account|Dernière mise à jour: 29/09/2017
|
1 Contributeur

Représente une collection d’objets Assignment où la ressource est surutilisée.Represents a collection of Assignment objects where the resource is overallocated.

RemarquesRemarks

Utilisez la propriété Item pour obtenir un seul objet de la collection OverAllocatedAssignments .Use the Item property to get a single Assignment object from the OverAllocatedAssignments collection.

ExempleExample

L’exemple suivant recherche les affectations où la ressource est surutilisée. Lorsque l’argument overPeak est False, la surutilisation n’est pas supérieure au délai maximal des ressources disponible (100 %). Si vous définissez overPeak sur True, l’exemple recherche des affectations surutilisées qui dépassent les temps maximal des ressources disponibles, telles que 150 %.The following example finds assignments where the resource is overallocated. When the overPeak argument is False, the overallocation is not greater than the maximum resource time available (100%). If you set overPeak to True, the example finds overallocated assignments that exceed maximum resource time available, such as 150%.

Sub FindOverallocatedAssignments()  
    Dim t As Task  
    Dim a As Assignment  
    Dim overAlloc As OverAllocatedAssignments  
    Dim numOver As Long  
    Dim overPeak As Boolean  

    overPeak = False  

    For Each t In ActiveProject.Tasks  
        If t.Overallocated Then  
            Set overAlloc = t.StartDriver.OverAllocatedAssignments(overPeak)  
            numOver = overAlloc.Count  
            totalNumOver = overAlloc.TotalDetectedCount  

            For Each a In overAlloc  
                Debug.Print "Resource: " & a.Resource.Name & " is overallocated on task: " & t.Name  
                Debug.Print vbTab & "Number of overallocated assignments: " & numOver  
            Next a  
        End If  
    Next t  
End Sub

PropriétésProperties

NomName
ApplicationApplication
CountCount
ItemItem
ParentParent
TotalDetectedCountTotalDetectedCount

Voir aussiSee also

Autres ressourcesOther resources

Modèle d’objet projetProject Object Model

© 2018 Microsoft