Re: Excessive delay when updating 'TimeScaleData' via automation
From: Jan De Messemaeker (jandemes)
Date: 09/08/04
- Previous message: Cor Ligthert: "Re: VBA code in a VB.Net application"
- In reply to: WGHayes: "Excessive delay when updating 'TimeScaleData' via automation"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Sep 2004 19:00:16 +0200
Hi WG,
I have experienced 'some' problems when trying to enter timescaled data into
periods where teh resource is not available (mostly run time errors)
Now before putting anything in a timescaled value I routinely check
TheResources.Calendar.Period(The periodconcerned).working
And if that is false I do not write to the timescaled value (in some
applications I add the value to eh first following working day)
HTH
-- Jan De Messemaeker Microsoft Project Most Valuable Professional http://users.online.be/prom-ade/index.htm 32-495-300 620 "WGHayes" <hayes@nospam99-please.com.au> schreef in bericht news:413e7e76$1@duster.adelaide.on.net... > Dear Reader, > > We have an application which is updating 'Forecast' and 'Time***' data > into MS Project 2002 using automation for analysis purposes. Our > application has options to update either:- Work, BaselineWork or Actual work > depending on what the circumstance and requirement is. > > We are using the 'TimeScaleData' method as follows (example for updating > WORK value):- > ---- > MSProject.Application.ActiveProject.Tasks.UniqueID(nnn).Assignments.UniqueID > (nnn).TimeScaleData(StartDate:=strStartDate, EndDate:=strEndDate, Type:=8, > TimeScaleUnit:=4, Count:=1).Item(1).Value = dblHours > > (Note:- where, nnn, strStartDate, strEndDate, dblHours are passed in). > --- > > We are also creating/updating all resource and calendar information (i.e. we > are actually creating a NEW MS Project for each analysis run that we do and > LOAD all the data required). This means we are using our own employee > calendars and NOT the Microsoft standard calendars. > > We have noticed that on occasion there is a significant delay in performing > an update using this method for a single timephased assignment entry (over > 20 seconds on a reasonably spec'd machine - P3-500, 512MB Ram). We have > narrowed the problem down to issues with the working calendar for resources. > If a resource is NOT available on the day for which we are updating 'ACTUAL > WORK' then MS Project just freezes. However, this is not always the case. > It seems to depend on other resources and assignments already created for > the TASK that we are adding and assignment for? > > If we open the MS Project interactively and manually EDIT/ADD the records > (i.e. repeat the steps that would have otherwise be performed via > automation) the problem does not exist. > > My questions are:- > > Q1- Has anyone had a similar performance/freeze issue? > > Q2- What is MS Project actually doing that could cause an excessive delay > (i.e. project recalculate, changing other assignment entries, other???) > > Q3- How could I debug the problem further? (i.e. in the DEBUG window when I > step through the line of code it just freezes for 20 seconds -how can I > debug this?) > > Any advice of feedback on this would be appreciated. > > Regards, > WGH. > > >
- Previous message: Cor Ligthert: "Re: VBA code in a VB.Net application"
- In reply to: WGHayes: "Excessive delay when updating 'TimeScaleData' via automation"
- Messages sorted by: [ date ] [ thread ]