Quick Links

Gantt – sort by path

Home Forums Discussion Gantt – sort by path

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #409450 Reply

    I’m looking to sort the Gantt chart for easier viewing.
    I currently export a data dump which I import into Project 2013. While the tasks are linked, they aren’t intuitive to view as the tasks arrive in creation order and not the order of work.
    For instance, deliverable (a pen) has 6 task before it in a network.

    Task Name Successor
    1 Roll refill 5
    2 Fill ink
    3 Attach nib 7
    4 Mill barrel 7
    5 Mill cap 2
    6 Paint parts 1
    7 Assemble pen 2

    My current thought was I’d like to sort them by their network path. If I list the path from Deliverable.nOperations.CurrentOperation and sort path Z to A:
    Task Name Successor Path Sort Order
    6 Paint parts 1 1
    1 Roll refill 5 2.5.1 2
    5 Mill cap 2 2.5 3
    3 Attach nib 7 2.7.3 4
    4 Mill barrel 7 2.7.4 5
    7 Assemble pen 2 2.7 6
    2 Fill ink 2 7

    For reference, the data is of about 1500 lines so manually is too slow and isn’t reactive if we change how we manufacture the part.
    Either a way to produce this solution or an alternative solution would be great.

    #409451 Reply
    Larry Christofaro

    Ben, my simplest suggestion would be to sort by start date. That will sort tasks by start date within summary task. Another option that might be a bit more work is to create a field called Deliverables, group by Deliverables, and then by Start. Let us know if either of those come close.

    #409539 Reply

    Larry, thanks for your response. The start date sort does make it easier, but it leaves a lot of dependencies a fair distance from one-another which leaves them hard to follow. I’ve not a quick way to assign the 50+ deliverables to the 1500 lines (up to 5 levels of WBS for each deliverable) without manually following through the paths. Is there any way to get MSP to find the last item in the chain as a calculation (i.e. not just highlighting the task paths on the Gantt)?

    #409540 Reply
    Larry Christofaro

    The only other option I can see is to use the Task Path, which is a visual only option. That can give you immediate response while working on the schedule.

    #409561 Reply
    Tom Boyle

    Larry has given you the best advice for native MS Project functionality. Task Path provides a very welcome graphical addition, but you can’t group or sort based on it.

    Sorting by logical path is a natural output of recursive logic tracing routines. If you are comfortable with vba (macro language), here’s a link to a set of macros on my blog that automatically filter and sort for task path. I grabbed your pen example (with completely imaginary durations) to illustrate the concept. Here it is sorted by ID, sorted by Start, and filtered/sorted by the QTraceP (i.e. quick trace predecessors) macro. PenPaths1

    If you’d rather not mess with vba, I use an add-in called BPC Logic Filter that can generate nearly identical output. PenPaths2

    #409671 Reply
    Sai Prasad
    • Community Leader
    • Forum Pro

    You can use the new Task Path feature along with VBA to display the successor path order
    1. You need to paste the below code in VBA editor. Click Format tab, Macros > Visual Basic. Double click “This Project” and paste the below code
    Option Explicit

    Sub DisplayPathSuccessor()
    Dim t As Task
    Dim chkTsk As Task
    Dim selectedTaskId As Integer

    Application.Sort (“Id”)
    Application.HighlightSuccessors True

    For Each t In ActiveProject.Tasks
    selectedTaskId = t.ID
    Application.SelectRow Row:=selectedTaskId, RowRelative:=False

    t.Text1 = “”

    If Not (ActiveSelection.Tasks Is Nothing) Then

    For Each chkTsk In ActiveProject.Tasks
    If Not (chkTsk.ID = selectedTaskId) Then
    If chkTsk.PathSuccessor Then
    t.Text1 = t.Text1 & ” ” & chkTsk.ID
    End If
    End If
    Next chkTsk

    t.Text1 = t.Text1 & ” ” & t.ID
    End If
    Next t

    Application.HighlightSuccessors False
    End Sub
    2. You may get an error because ” quotes will not be pasted properly. Correct it.
    3. Save and close the VBA editor
    4. Click View, Macros, View Macros > select DisplayPathSuccessor and run. This will set the successor path in Text1 column.
    5. Insert Text1 column to view the Successor path

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Gantt – sort by path
Your information:

38 + = 39