Home > Net >  MS Project - preserving links between projects in a Sub / master plan converting to a single plan
MS Project - preserving links between projects in a Sub / master plan converting to a single plan

Time:10-14

I have a simple master plan with 3 inserted projects. There are links between tasks in different projects. I can make and break these links based on references etc.

I now want to be able to crush the master / sub plans into a single large plan with these links preserved.

Simply delinking the sub plans doesn't work as the master plan maintains links to the now delinked originals.

Any ideas how I can do this?

Thanks

Miles Edited to add: Normally I wouldn't have links between files however there are a lot of interconnected activities in these plans. These are designated with a dependency code so that we can ensure that things line up manually. I have a macro which can make and break dependencies so that we can see the critical path across the programme and to avoid the need to go around the manual update loop more than once when a task chain dips in and out of a plan. Having the plans as seperate entities is very useful as each PM has their own plan. Being able to combine them into a programme plan is vital for critical path etc. However it would be useful to be able to distribute a single plan at times, hence this question.

CodePudding user response:

This can be done. It requires a lot of code and is therefore beyond the scope of a SO question. But here is the basic algorithm:

  1. loop through tasks:
  • store current UID and Project name in unused fields
  • and for cross-project-linked tasks, store the master UID, the original UID (derived from master uid), and project name in a list, array, etc.
  1. Unlink the subprojects

  2. Loop through tasks again and update the list of links with the new unique IDs

  3. Loop through the tasks once more, by task index this time, and update the links from pointing to external tasks to instead point to the new embedded task. (Note, removing an external link removes the associated ghost task from the task collection, thus loop by task index).

Tips:

  • You may find that additional fields are useful to store info as you loop through tasks (e.g. flag fields & other text fields).

  • If you get stuck, post a new SO question with a specific example of where the code isn't working. See How do I ask a good question?

CodePudding user response:

Several years ago I wrote a macro that does exactly what you want, it basically operates using a process similar to what Rachel outlined. However, the macro is not freeware so I'm not sure how that type of solution is handled in this "forum".

This is not a solicitation, it is simply a comment. If interested, let me know.

John

  • Related