none
Microsoft Project - externally created XML files RRS feed

  • Question

  • Hi,

    To speed up the creation of our project plans I developed a script that automatically creates a XML output file following a number of questions. So far so good, XML files are 'successfully' created and I can import them into Microsoft Project 2010. Everything seems to be looking good  in Microsoft Project (tasks, resources, structure, duration, etc...). However, if saving this as "Project (*.mpp)", and reopening the .mpp file, task resources have all been reset to one same resource. As a quick example, let's assume I imported my XML code and could see:

    Task 1 - Name: project start - Resource: project manager
    Task 2 - Name: install software - Resource: engineer installation
    Task 3 - Name: close project - Resources: project manager, engineer installation

    Then after having saved as MPP and reopened the project I can see:

    Task 1 - Name: project start - Resource: engineer installation
    Task 2 - Name: install software - Resource: engineer installation
    Task 3 - Name: close project - Resources: engineer installation, engineer installation

    In my XML file a Task statement looks typically like:

        <Task>
          <CreationDate>2016-08-22T16:55:30</CreationDate>
          <Duration>PT2H0M0S</Duration>
          <DurationFormat>7</DurationFormat>
          <ID>58</ID>
          <IsNull>0</IsNull>
          <Milestone>0</Milestone>
          <Name>Review, update documentation</Name>
          <OutlineLevel>4</OutlineLevel>
          <OutlineNumber>58</OutlineNumber>
          <PredecessorLink>
            <PredecessorUID>57</PredecessorUID>
            <Type>1</Type>
            <CrossProject>0</CrossProject>
            <LinkLag>0</LinkLag>
            <LagFormat>7</LagFormat>
          </PredecessorLink>
          <RegularWork>PT2H0M0S</RegularWork>
          <RemainingDuration>PT2H0M0S</RemainingDuration>
          <RemainingWork>PT2H0M0S</RemainingWork>
          <Type>0</Type>
          <UID>58</UID>
          <Work>PT2H0M0S</Work>
        </Task>

    A resource statement like:

        <Resource>
         <CalendarUID>1</CalendarUID>
         <CreationDate>2016-08-22T16:55:30</CreationDate>
         <ID>23</ID>
         <Name>Project Manager</Name>
         <Type>1</Type>
         <UID>23</UID>
        </Resource>

    An Assignment statement looks like:

        <Assignment>
          <RegularWork>PT2H0M0S</RegularWork>
          <RemainingWork>PT2H0M0S</RemainingWork>
          <ResourceUID>23</ResourceUID>
          <TaskUID>58</TaskUID>
          <UID>22</UID>
          <Units>1</Units>
          <Work>PT2H0M0S</Work>
        </Assignment>

    Any obvious thing I might have missed? Many thanks in advance for your support!!

    Monday, August 22, 2016 4:06 PM

Answers

  • Just replying to my own issue. I seem to have pin-pointed the problem. I was linking each resource to the base calendar (using <CalendarUID>1</CalendarUID>). However, it looks like every resource requires its own calendar even if that calendar is itself link to the base calendar (<BaseCalendarUID>1</BaseCalendarUID>).

        <Resource>
         <CalendarUID>23</CalendarUID>
         <CreationDate>2016-08-23T16:06:11</CreationDate>
         <ID>23</ID>
         <Name>Project Manager</Name>
         <Type>1</Type>
         <UID>23</UID>
        </Resource>

        <Calendar>
          <UID>23</UID>
          <Name>Project Manager</Name>
          <IsBaseCalendar>0</IsBaseCalendar>
          <IsbaselineCalendar>0</IsbaselineCalendar>
          <BaseCalendarUID>1</BaseCalendarUID>
        </Calendar>

    • Marked as answer by Happidays Tuesday, August 23, 2016 3:51 PM
    Tuesday, August 23, 2016 3:50 PM