Hi to All
Me Suresh,
written below code for getting the peakunits of all resources from MS Project File.
But getting only few values and in the middle got the following Exception
"Exception from HRESULT: 0x800A03EC".
//-------------------------------------------------------------------
object oMV = Missing.Value;
MSProject.Application msp = new MSProject.Application();
msp.FileOpen(@"C:\Agra Bypass Analysis.mpp", false, oMV, oMV, oMV, oMV, oMV, oMV, oMV, oMV, oMV, MSProject.PjPoolOpen.pjPoolReadWrite, oMV, oMV, oMV, oMV);
foreach
(MSProject.
Resource res
in msp.ActiveProject.Resources)
{
MSProject.TimeScaleValues tsvs = res.TimeScaleData(msp.ActiveProject.Start, msp.ActiveProject.Finish, MSProject.PjResourceTimescaledData.pjResourceTimescaledPeakUnits, MSProject.PjTimescaleUnit.pjTimescaleYears, 1);
foreach(MSProject.TimeScaleValue tsv in tsvs)
{
try
{
MessageBox.Show(res.Name + ": " + tsv.Value.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
//--------------------------------------------------
I shall be great full if you provide me solution to the mentioned problem.
waiting for your reply as soon as possible.
Thanking you very much
Suresh.Gidugu