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 6105557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:59:03+00:00 2026-05-23T13:59:03+00:00

I am working with MPXJ framework to generate an XML file with i import

  • 0

I am working with MPXJ framework to generate an XML file with i import into project 2007. I have run in to allot of problems but i can’t seem to find an answer to the following.

I have a fixed Work and duration on a task, but when i add a resource and import it in project i get an error message:

“The resource is assigned outside the original dates for task 2 in project. The duration of this fixed-duration task will change to accommodate the resource assignment”.

Project then changes the work and or duration value. that is not what i want. i want the resource to use the 24 hours calendar but i can’t seem to attach the project 2007 standard calendar, so i thought lets make my own 24 hours calendar and attach that to resource. now i can’t seem to set the 0:00:00 to 0:00:00 time in a work day.

ProjectCalendar calendar = projectFile.addResourceCalendar();
calendar.setName("24 Hours");
calendar.setUniqueID(Count);
calendar.setWorkingDay(Day.MONDAY, true);
calendar.setWorkingDay(Day.TUESDAY, true);
calendar.setWorkingDay(Day.WEDNESDAY, true);
calendar.setWorkingDay(Day.TUESDAY, true);
calendar.setWorkingDay(Day.FRIDAY, true);

Resource resource = projectFile.addResource();
resource.setUniqueID(Count);
resource.setName("Painters");
resource.setResourceCalendar(calendar);

Any one know of a solution to one get the default 24 hour calendar set to the resource of make my own.

  • 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-23T13:59:04+00:00Added an answer on May 23, 2026 at 1:59 pm

    The code below illustrates how to create a 24 hour calendar. My apologies for the long-winded way each day is set up, I need to improve the way the Day class works so that it is easier to iterate.

    The key point to note is that the DateRange instance is set up to start at 00:00 hours on one date, and finish at 00:00 hours on the following day. The actual date used is irrelevant, the calendar is only using the time element of the date.

    Hope that makes sense!

      //
      // Use this date formatter to make it simple to specific the range
      // start and wne dates
      //
      SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    
      //
      // This is an immutable date range, so we can share it without
      // worrying about it being changed
      //
      DateRange range = new DateRange(format.parse("2000-01-01 00:00"), format.parse("2000-01-02 00:00"));
    
      //
      // Add the calendar and name it
      //
      ProjectCalendar test = file.addBaseCalendar();
      test.setName("Test 24 Hours");
    
      //
      // Mark each day as working
      //
      test.setWorkingDay(Day.SUNDAY, true);
      test.setWorkingDay(Day.MONDAY, true);
      test.setWorkingDay(Day.TUESDAY, true);
      test.setWorkingDay(Day.WEDNESDAY, true);
      test.setWorkingDay(Day.THURSDAY, true);
      test.setWorkingDay(Day.FRIDAY, true);
      test.setWorkingDay(Day.SATURDAY, true);
    
      //
      // Add a working hours range to each day
      //
      ProjectCalendarHours hours;
      hours = test.addCalendarHours(Day.SUNDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.MONDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.TUESDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.WEDNESDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.THURSDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.FRIDAY);
      hours.addRange(range);
      hours = test.addCalendarHours(Day.SATURDAY);
      hours.addRange(range);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a project at the moment and we have to implement soft deletion
Working on a project where a sequential set of methods must be run every
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working on a project that parses a log of events, and then updates a
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
I'm using the MPXJ library in .NET for parsing MS Project (MPP) files, and
Working on trying out the market licensing service, and I'm running into a few
Working with spring, below, the code of applicationContext-service.xml: <bean id=mediaObjectService class=path.MediaObjectServiceImpl> <property name=mediaObjectDao >
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a somewhat complex page for configuring customers at work. The setup is

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.