"Estimate work"

T

Tito

Hello Somebody, i've have a problem, because I need the information about
project and I don't know how I can take it.

I have a application, which take the resources that there are in the
project, and now I need that the application will take the "estimate work"
per month and per resource. If it's only per month is well too.

Sorry for my english is quite bad, thank you very much.
 
J

Jan De Messemaeker

Hi,

In which language is this application written?
Does it use the Project API (objects)?
If yes, look for the TimescaleValues object and the Timescaledata method.
HTH
 
T

Tito

I'm using C# in visual studio 2005, and I'm using the Project API (objects)
its my first time, Do you have any example to show me?.
 
T

Tito

I'm using C# in visual studio 2005, and I'm using the Project API (objects)
its my first time, Do you have any example to show me?.
 
J

Jan De Messemaeker

Hi,

I referred you to the VBA help amongst other things because there was an
example in it:
------------------------------------------------------------

Show All

TimeScaleData Method
See AlsoApplies ToExampleSpecifics

Returns timephased information for an assignment, resource, or task.


Syntax

expression .TimeScaleData(StartDate, EndDate, Type, TimeScaleUnit, Count)

expression Required. An expression that returns an object in the Applies
To list.

StartDate Required Variant. The start date for the timephased data. If
the start date falls within an interval, it is "rounded" to the start of the
interval. For example, if TimeScaleUnit was pjTimescaleWeeks and StartDate
specified a Wednesday, it would be rounded to the preceding Monday (assuming
the work week started on a Monday).

EndDate Required Variant. The end date for the timephased data. If the
end date falls within an interval, it is "rounded" to the end of the
interval.

Type Optional Long. The type of timephased data. The default value is pj
expression TimescaledWork, where expression is Assignment, Resource, or
Task.

If expression is an Assignment, can be one of the following
PjAssignmentTimescaledData constants:

pjAssignmentTimescaledActualCost pjAssignmentTimescaledCumulativeCost
pjAssignmentTimescaledActualOvertimeWork
pjAssignmentTimescaledCumulativeWork
pjAssignmentTimescaledActualWork pjAssignmentTimescaledCV
pjAssignmentTimescaledACWP pjAssignmentTimescaledOverallocation
pjAssignmentTimescaledBaseline1-10Cost
pjAssignmentTimescaledOvertimeWork
pjAssignmentTimescaledBaseline1-10Work
pjAssignmentTimescaledPeakUnits
pjAssignmentTimescaledBaselineCost
pjAssignmentTimescaledPercentAllocation
pjAssignmentTimescaledBaselineWork pjAssignmentTimescaledRegularWork
pjAssignmentTimescaledBCWP pjAssignmentTimescaledSV
pjAssignmentTimescaledBCWS pjAssignmentTimescaledWork
pjAssignmentTimescaledCost




If expression is a Resource, can be one of the following
PjResourceTimescaledData constants:

pjResourceTimescaledActualCost pjResourceTimescaledCumulativeWork
pjResourceTimescaledActualOvertimeWork pjResourceTimescaledCV
pjResourceTimescaledActualWork pjResourceTimescaledOverallocation
pjResourceTimescaledACWP pjResourceTimescaledOvertimeWork
pjResourceTimescaledBaseline1-10Cost pjResourceTimescaledPeakUnits
pjResourceTimescaledBaseline1-10Work
pjResourceTimescaledPercentAllocation
pjResourceTimescaledBaselineCost pjResourceTimescaledRegularWork
pjResourceTimescaledBaselineWork
pjResourceTimescaledRemainingAvailability
pjResourceTimescaledBCWP pjResourceTimescaledSV
pjResourceTimescaledBCWS pjResourceTimescaledUnitAvailability
pjResourceTimescaledCost pjResourceTimescaledWork
pjResourceTimescaledCumulativeCost
pjResourceTimescaledWorkAvailability




If expression is a Task, can be one of the following PjTaskTimescaledData
constants:

pjTaskTimescaledActualCost pjTaskTimescaledCumulativePercentComplete
pjTaskTimescaledActualFixedCost pjTaskTimescaledCumulativeWork
pjTaskTimescaledActualOvertimeWork pjTaskTimescaledCV
pjTaskTimescaledActualWork pjTaskTimescaledCVP
pjTaskTimescaledACWP pjTaskTimescaledFixedCost
pjTaskTimescaledBaseline1-10Cost pjTaskTimescaledOverallocation
pjTaskTimescaledBaseline1-10Work pjTaskTimescaledOvertimeWork
pjTaskTimescaledBaselineCost pjTaskTimescaledPercentComplete
pjTaskTimescaledBaselineWork pjTaskTimescaledRegularWork
pjTaskTimescaledBCWP pjTimescaledSPI
pjTaskTimescaledBCWS pjTaskTimescaledSV
pjTaskTimescaledCost pjTaskTimescaledSVP
pjTaskTimescaledCPI pjTaskTimescaledWork
pjTaskTimescaledCumulativeCost




TimeScaleUnit Optional Long. Can be one of the following PjTimescaleUnit
constants: pjTimescaleYears, pjTimescaleQuarters, pjTimescaleMonths,
pjTimescaleWeeks, pjTimescaleDays, pjTimescaleHours, pjTimescaleMinutes. The
default value is pjTimescaleWeeks.

Count Optional Long. The number of timescale units to group together.
The default value is 1.


Remarks
The TimeScaleData method should be used instead of the TimeScaledData
method, which is hidden by default in the object browser.

Example
The following example displays the number of hours of work per day for a
resource during the first full week in October. It assumes a resource view
is the active view.

Sub WorkHoursPerDay()
Dim TSV As TimeScaleValues, HowMany As Long
Dim HoursPerDay As String

Set TSV = ActiveCell.Resource.TimeScaleData("10/7/02", "10/11/02", _
TimescaleUnit:=pjTimescaleDays)

For HowMany = 1 To TSV.Count
If TSV(HowMany).Value = "" Then
HoursPerDay = HoursPerDay & TSV(HowMany).StartDate & " - " & _
TSV(HowMany).EndDate & ": 0 hours" & vbCrLf
Else
HoursPerDay = HoursPerDay & TSV(HowMany).StartDate & " - " & _
TSV(HowMany).EndDate & ": " & TSV(HowMany).Value / 60 & _
" hours" & vbCrLf
End If
Next HowMany

MsgBox HoursPerDay

End Sub
------------------------------------------------------------------------------------------Greetings,
 

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