Insert SubProject after Task x? (Linking ConsolidateProjects to Task)

Discussion in 'Project' started by surumadurum, Mar 31, 2016.

  1. surumadurum

    surumadurum

    Joined:
    Mar 31, 2016
    Messages:
    1
    Likes Received:
    0
    Hi,

    I have to solve the task of dynamically inserting Sub-Projects into a Master-Project at a specific position - which is under a certain "heading" and after all the already inserted SubProjects.

    Heading A
    Heading Aa
    - Project A1
    - Project A2
    Heading B
    - Project B1

    My problem is that ConsolidateProjects inserts the project at the current cursor position.
    Now I solved it like that:

    - collapse / expand all Tasks so that Headings and Subheadings are visible but all Subtasks of Sub-Projects are hidden
    - iterate through rows with SelectRow, get task-name with ActiveSelection.Tasks(1).Name
    - if it's the right heading, get number of already inserted subprojects with Tasks(from_last_step).OutlineChildren.Count
    - Call ConsolidateProjects
    - Indent the new inserted project to the correct level

    This solution has shown to be very error-prone. The initial indent of the new subproject seems quite random and often the subprojects and up at the wrong position.

    Isn't there any solution like "Insert subproject after Task(x), no matter in which row it is displayed at the moment"?

    Hope somebody has help!
     
    surumadurum, Mar 31, 2016
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Sean Robinson
    Replies:
    0
    Views:
    1,607
    Sean Robinson
    Nov 22, 2010
  2. spog88
    Replies:
    2
    Views:
    525
    spog88
    Sep 19, 2011
  3. Nick

    Task list for shared resource

    Nick, Oct 21, 2011, in forum: Project
    Replies:
    0
    Views:
    456
  4. fkr1972
    Replies:
    2
    Views:
    533
    fkr1972
    Mar 2, 2012
  5. rcabanas1976@gmail.com
    Replies:
    0
    Views:
    604
    rcabanas1976@gmail.com
    May 27, 2012
  6. b.murugun
    Replies:
    0
    Views:
    434
    b.murugun
    Aug 29, 2013
  7. amithrt
    Replies:
    0
    Views:
    455
    amithrt
    Nov 2, 2013
  8. Jarek
    Replies:
    1
    Views:
    397
    Jarek
    Oct 8, 2015
Loading...