As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

C# / MS Project

jclastjclast Registered User regular
edited July 2010 in Help / Advice Forum
It's a long shot, but I figure I'll ask her. I'm trying to write a program that takes a text report and turns it into a Gantt chart in MS Project. I know how to add tasks and split tasks, and all that good stuff, but I can't for the life of me figure out what I need to do to convince Project to use a 24 hour day instead of 8:00-12:00/1:00-5:00.

If I were just making the thing once in Project it'd be Project -> Project Information -> Change Calendar to "24 hours" so it ought to be possible.

I was hoping it'd be
proj.Calendar.Name = "24 Hours";
but that doesn't work.

Anybody here ever do this before?

camo_sig2.png
jclast on

Posts

  • Options
    bowenbowen How you doin'? Registered User regular
    edited July 2010
    From what I can ascertain it's based off your PC's time. Changing your PC to 24hour time will switch the project to 24 hour time.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    jclastjclast Registered User regular
    edited July 2010
    bowen wrote: »
    From what I can ascertain it's based off your PC's time. Changing your PC to 24hour time will switch the project to 24 hour time.

    That's not what I mean. MS Project, by default, works on a M-F 8:00 - 5:00 are working hours concept. You can tell it that the schedule you're making is 24 hours within Project (which I know how to do). This, assuming I was just making a single schedule in Project, will allow me to schedule something from, say, 2:30 AM to 3:00 PM. Toggling that is what I'm trying to do within my C# app, but I can't figure it out.

    jclast on
    camo_sig2.png
  • Options
    bowenbowen How you doin'? Registered User regular
    edited July 2010
    Oh hm, that's interesting then.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    TofystedethTofystedeth Registered User regular
    edited July 2010
    Does this help any?
    It looks like the Project object has an HoursPerDay property, but I don't know if that does what you want. I can't see any property in the Calendar object that looks like that. But then I'm not really very familiar with COM.

    Tofystedeth on
    steam_sig.png
  • Options
    TofystedethTofystedeth Registered User regular
    edited July 2010
    Also have you asked in the programming thread in the Tech forum?

    Tofystedeth on
    steam_sig.png
Sign In or Register to comment.