Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6227669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:15:45+00:00 2026-05-24T09:15:45+00:00

I want to extract the planned work over the time from MS Project using

  • 0

I want to extract the planned work over the time from MS Project using MPXJ.
Does anyone know how to get these figures via API?
I cannot find any appropriate method for doing this.

(Concrete scenario: I want to draw a chart with the planned work on the y-axis and the date on the x-axis)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:15:46+00:00Added an answer on May 24, 2026 at 9:15 am

    your starting point is the following methods on the assignment object:

    List<TimephasedResourceAssignment> complete = assignment.getTimephasedComplete();
    List<TimephasedResourceAssignment> planned= assignment.getTimephasedComplete();
    

    As their names suggest, these will get you either the planned work or the complete work, expressed as work carried out over periods of time.

    The “gotcha” here is that this data is represented in a compact format (reflecting how it’s stored by MS Project internally), and this does not lend itself well to showing a period-by-period breakdown of work.

    To get what you want, there are two utility classes which will help you to convert this compact representation into a list of work values. For example, you can give them a start date a period type (day, week, month and so on) and a number of periods, and ask for the work to be broken down over these periods.

    First step is to create an instance of the TimescaleUtility class, and get it to generate a range of dates for you. You give it the start date, the timescale units you require, and the numnber of periods you want.

    TimescaleUtility timescale = new TimescaleUtility();
    ArrayList<DateRange> dateList = timescale.createTimescale(startDate, TimescaleUnits.DAYS, length);
    

    The dateList variable now contains the list of date ranges you are going to split the work over. This split is carried out using the TimephasedUtility class:

    ProjectCalendar calendar = assignment.getCalendar();
    TimephasedUtility timephased = new TimephasedUtility();
    ArrayList<Duration> durationList = timephased.segmentResourceAssignment(calendar, planned, TimescaleUnits.DAYS, dateList);
    

    That’s it, your durationList now contains one entry for each entry in the datList showing the amount of work for that period.

    Hope that makes sense!

    Jon

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to extract number and add these numbers using Java and String remain
I want to extract the blog content from my Posterous blog using the API
I want to extract text from a column using regular expressions in Oracle 11g.
I want to extract attributes from an xml file using Sax Parser I am
I want to extract rows 1 to n from my .csv file. Using this
I want to extract a string from a cell using a regex match. I
I want to extract values from music structure directories using File::Find::Rule and I'm having
I want to extract a value from my hidden inputbox, by using javascript, but
I want to extract from a String formatted information. Let's say I have these
I want to extract from a webpage all URLs how can I do that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.