Copy tasks between projects programmatically

P

Predrag

Hi,

Could somebody help me?
I have to programmatically copy tasks from one huge
project (more than 6000 tasks) to another project. I
don't want to copy all of the tasks but only certain ones
(still a big number, more than 2500 of them). At the same
time I have to maintain their relationship (parent-child
tasks, etc), assignments, resources, etc.
I tried different approaches but none of them seems to
work. I tried it in both Project 2002 and Project 2003.

1-st approach

I made another copy of my project, removed all of the
tasks that I don't want to copy, and then copied remaining
tasks, ~2500 of them, to another project, using EditCopy
and EditPaste methods. It took about 20 min to copy them,
and at first I thought it was successful. However I then
realized that assignment details were not copied
properly. Tasks at the beginning had correct resources
assigned but those at the end had completely different
resources, those never assigned to them. It seems as if
after some number of tasks Project just lost it.
By the way, Project showed the same behaviour even when I
manually copied and pasted tasks between different
projects. It just starts assigning wrong resources to
copied tasks after some number of tasks.

2-nd approach
I was thinking about exporting project file as an XML
(using SaveAs and XML format) and then importing it into
another project. However, this one failed too because
Project would just hang there forever, probably trying to
load the whole XML structure into the memory before
writing it to a file. I left it run a whole night and the
only thing I found in the morning was that I had to reboot
the computer. It was still doing something.

3-rd approach
I was thinking about going task by task, adding it to a
new project and then copying properties from the old task
to the new one. However, this one looks very impractical
because of huge number of properties a task has and
because there is no way of copying them at once. Besides,
this way I would probably have to recreate the whole
structure (parent - child and the rest) in the new project.

So here I am, don't know what else to try. I would really
appreciate if someone could give me some hints what else
to try.

Thanks,

Predrag
 
J

Juergen Stock

Hi Predrag

the effect you describe somehow looks like a memory
problem - yous first approach should work BUT it may fail
whwn your computer hasn't got enough memory. Try again on
a computer having more memory if available.

Juergen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top