Poor performance during tasks adding

G

Gabriele

Hi to all,
I'm using the COM Project from my application to add a large number of
tasks to a project in which I created many custom fields and outline
codes.
I create an MSProject.Application instance (called i.e. myproj1) when
I load my application and after I loop for each task I need to add
calculating the fields of the current task and adding it to the
myproj1.Tasks collection at the botton of the loop.
This approach has very poor performances when I add a thousand of
tasks and causes the crach of my application! I think that the problem
could be the call of the add method thousand times.. How can I solve
the problem?
Any suggestion will be very valued!!!!
Gabriele
 
R

Rod Gill

Hi,

Try creating the project in a database then open the project from the
database. This will be much faster. Read projdb.htm in the project CD for
details. Alternatively add the tasks to an Excel spreadsheet and import from
there or from a .xml file (Project 2002+).

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 
G

Gabriele

Hi,
I am going to experiment your solution and it seems quite
powerful...but the database structure seems quite complicated, so I'm
reading carefully the "pjdb.htm" file. I wonder if and where I can
find routines already written in order to add tasks or anything else
to speed up my work. Any suggestion? Thanks for your precious help!
Gabriele
 

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