M
Maarteke
Hi,
I have a problem whith an MS Project 2003 COM Addin written in VB.net
In my code, I want to retrieve the work for each assignment for each month:
timeScaleValues = assignment.TimeScaleData(fromDate, Enddate ,
pjResourceTimescaledWork, pjTimescaleMonths, 1)
For Each timeScaleValue In timeScaleValues
MyObject.Add(timeScaleValue.Value)
Next
If i run this code, i get the com exception "An unexpected error occurred
with the method"
This seems to be because of a resource limit in MS Project:
http://www.projectserverexperts.com/Shared Documents/SolveCOMExceptionError.htm
If i change my code to it works:
timeScaleValues = assignment.TimeScaleData(fromDate, toDate,
pjResourceTimescaledWork, pjTimescaleMonths, 1)
For Each timeScaleValue In timeScaleValues
MyObject.Add(timeScaleValue.Value)
If GBCounter = 7 Then
GBCounter = 0
GC.Collect()
Else
GBCounter += 1
End If
Next
The garbage collection of course slows down my add-in.
Can i free my timescaleValue objects without having to call GC.Collect?
I have a problem whith an MS Project 2003 COM Addin written in VB.net
In my code, I want to retrieve the work for each assignment for each month:
timeScaleValues = assignment.TimeScaleData(fromDate, Enddate ,
pjResourceTimescaledWork, pjTimescaleMonths, 1)
For Each timeScaleValue In timeScaleValues
MyObject.Add(timeScaleValue.Value)
Next
If i run this code, i get the com exception "An unexpected error occurred
with the method"
This seems to be because of a resource limit in MS Project:
http://www.projectserverexperts.com/Shared Documents/SolveCOMExceptionError.htm
If i change my code to it works:
timeScaleValues = assignment.TimeScaleData(fromDate, toDate,
pjResourceTimescaledWork, pjTimescaleMonths, 1)
For Each timeScaleValue In timeScaleValues
MyObject.Add(timeScaleValue.Value)
If GBCounter = 7 Then
GBCounter = 0
GC.Collect()
Else
GBCounter += 1
End If
Next
The garbage collection of course slows down my add-in.
Can i free my timescaleValue objects without having to call GC.Collect?