Simple Macro for Listing Driving Predecessor(s) in MS Project

The Drivers macro reads and copies the ID of each task’s driving predecessors into a custom text field for the task.

One of the missing features for anyone coming to MSP from Primavera’s planning tools is the little mark designating the driving predecessor(s) in the predecessors list for each activity.

MS Project 2010+ kind of addresses this with a feature called “Task Inspector” that opens a pane and displays some scheduling factors affecting the selected task.  One of the factors displayed is the “Predecessor Tasks:” table, which lists the predecessor(s) (if any) that limit the early start date of the selected task.  The driving predecessor is inserted as a link, so it is possible to jump backwards through the driving logic of the schedule.

Since I use BPC Logic Filter, I haven’t had much use for Task Inspector.  Still, it is occasionally useful to see a long list of predecessors and know immediately which ones are driving the selected task.  Here is a little macro to copy the IDs of the driving predecessors into the “Text2” field of each task.

Sub Drivers()

    Dim t As Task
    Dim td As TaskDependency
    Dim PredDr As String
    Dim i As Integer
    
    
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            PredDr = ""
            i = 0
        
            For Each td In t.StartDriver.PredecessorDrivers
                i = i + 1
                If i = 1 Then
                    PredDr = PredDr & td.From.ID
                Else
                    PredDr = PredDr & "," & td.From.ID
                End If
            Next td
            
            t.Text2 = PredDr
        End If
    Next t

End Sub

The user can then insert the “Text2” column in any task view.  The image at the top of the post is a little schedule with the column inserted as shown and named “Driving Pred”.

The “Drivers” determination is done by MSP’s scheduling engine, and I have found it to be unreliable for driving predecessors that are not Finish-to-Start links.  (Problems with Driving Logic in Task Inspector and Task Paths – Microsoft Project 2010-2016)  Nevertheless, it’s better than nothing.  Obviously, the macro needs to be re-run whenever the logic or task numbering changes….

If you are interested in a real logic trace of the driving path for the activity, then you’ll need a much more sophisticated macro (like this one) or a full-fledged Add-In like BPC Logic Filter – shown in this video.    As a side feature, BPC Logic Filter includes a task Logic Inspector that displays driving and non-driving relationships for any task.  Visit the BPC Logic Filter page to download a fully-functioning Trial version.

 

Monitoring Near Critical Tasks in Microsoft Project

Here I address the fundamental inability of MSP users – even supposed experts – to correctly analyze a logic-driven schedule.

While rooting around Planning Planet this morning, I stumbled across this link to an 8-month old blog entry from Ten Six Consulting: Monitoring Near Critical Tasks in Microsoft Project 2013 | Ten Six Consulting.  In light of my work on BPC Logic Filter, this was a subject of interest to me.  I started to reply on PP, but as my response grew I decided to transform it into an entry over here….

Overall I believe the article presents a perfect example of the fundamental inability of MSP users – even supposed experts – to correctly analyze a logic-driven schedule.  The primary reason for this is the user community’s reliance on Total Slack as the sole indicator of a given task’s “criticality” or its inclusion on a particular logical path – all while continuing to use constraints, deadlines, and variable calendars.

As usual, the article is a well written and nicely presented illustration of a fairly elementary concept, i.e. generating and applying a “Near Critical Filter” to show only tasks with Total Slack values between 0.1 and 10 days.  Ten Six then applied this filter to “clearly see all the tasks that are non-critical but in danger of becoming critical if they are delayed in any way.”  Here is the resulting chart (taken from their article) with the four “Near Critical” tasks highlighted.  The chart implicitly tells us that a Finish-No-Later-Than (2/22/15) constraint has been applied to the “Install Fence” task, reducing its Total Slack to 4 days.  Now the Fence and its only predecessor (Grade Site) are highlighted as Near-Critical.  (The TS=2 on the “Above Grade” summary task, also highlighted, seems to be a fluke of MSP’s screwy roll-up rule for TS; it reflects no logical relationship. [See Total Slack Calculation for Summary Tasks in Microsoft Project.])

Near-Critical-Tasks-in-Microsoft-ProjectFig-7

So, if the fence is delayed by 5 days, is the project’s completion delayed?  Clearly No; not according to this schedule.  The fence is not Near Critical for the project.  It merely has a constraint that may be violated (generating negative slack) if it slips too much.  Since it is a common practice to represent such commitments with late constraints or deadlines, this example is fairly typical of a situation that occurs routinely in complex schedules with multiple contract milestones.  It demonstrates why total slack is an unreliable indicator of the critical/near-critical path – i.e. the driving/near-driving path for project completion (or for anything else) –for all but the simplest projects.

There are some traditionalists in the scheduling profession who aim to preserve the sanctity of Total Slack (and Total Float in other tools) by prohibiting the use of any deadlines or late constraints in the schedule at all, regardless of contract commitments.  The same group should also prohibit the use of variable task calendars, resource calendars, and any kind of resource leveling, since these can also invalidate their interpretation of total slack.  I understand and empathize with this point of view – after all, without meaningful Total Slack (especially in MSP), the typical planner or analyst is reduced to hand-waving explanations when it comes to answering the tough questions.  I’ve been there.  Nevertheless, I also think alarm bells should ring and the schedule should bleed red whenever there is a forecast failure to meet a commitment.  I advocate for methods other than setting aside 30 years of software development.

I spent a few minutes duplicating Ten Six’s schedule in MSP 2010 – thankful that they seem to be using the same (standard) example for the two articles published eight months apart.  I think I got it close enough for illustrative purposes – with the main factors being a 4-day project work-week (M-Th), a 24-hour calendar on the first two milestones, and the aforementioned late constraint on the fence.  Then I used BPC Logic Filter to trace the logic for the “Project Complete” task.

Here’s the resulting chart.  It shows the driving path for project completion (i.e. the “Critical Path”) – at Relative Float of 0.  The CP includes all the tasks with TS=0 plus the two project milestones which, because of their different calendars, have a different Total Slack value.  The first “Near-Critical Path” is actually 12-days (not 4 days) away from driving the project completion, and it includes the “Grade Site” task with the (synthetically reduced) TS=4.  The “Install Fence” task, also with TS=4, is 24 days away from driving the project completion.

TMB Copy TenSixExample 20150130-20150821

I didn’t write BPC Logic Filter to overcome all the shortcomings of MSP; rather I wrote it to extract and present the logic-related information that is already there but which MSP does not show.  In this case – as in most – it tells a more complete story than Total Slack alone.