How to restart unique id counter in mpxj ProjectFile

3.8k views Asked by At

I have to regenerate a ProjectFile from a previous MPP stored in my database.

I remove all tasks and resources and recreate them with refresh data from my system database.

I would like to restart the counters of next unique IDs used for creating tasks and resources.

Is there an easy way to accomplish that?

1

There are 1 answers

2
Andrew - Eversight Ltd On

You can do this by:

  1. Save your existing project somewhere
  2. Creating a new blank project
  3. From the ribbon, select Project > Subproject
  4. Browse to your saved project, and click Insert
  5. In the gantt view, Double click on the inserted project (i.e. the one with the MS Project file icon in the indicator column)
  6. The Inserted Project Information dialogue will be displayed, move to the Advanced tab and untick the "Link to project:" checkbox.
  7. Click OK
  8. Back in the gantt view, expand the inserted sub-project so you can see all the level 1 tasks.
  9. Select all the level 1 tasks and from the ribbon menu select Task > Outdent
  10. Delete the inserted project task (which now contains no child tasks)
  11. Save the resulting file

You'll now have a clean version of your schedule - all the object IDs will be rest starting numbering from 1, and you'll have cleared out config like views, custom formatting or macros that may have been assigned to your project.