how to add a link between 2 tasks in ms project

L

linsen

i have an issue. there are 2 projects and each project has some 5 subtasks.
in the second project i want to set a link between 2 tasks and did it using
the function LinkPredecessors. but in the result, the link was formed between
the task in the second project and a task in the first project, because both
of them had the same names. but actually i want the link between the tasks in
the second project. please help me out.
 
J

John

linsen said:
i have an issue. there are 2 projects and each project has some 5 subtasks.
in the second project i want to set a link between 2 tasks and did it using
the function LinkPredecessors. but in the result, the link was formed between
the task in the second project and a task in the first project, because both
of them had the same names. but actually i want the link between the tasks in
the second project. please help me out.

linsen,
It sounds like your code is using a task object form one file as the
"expression" part of the syntax and a task object from the second file
as the "Tasks" object of the syntax, although it's not clear why the
code would even be able to access objects from both files, unless
perhaps you were trying to do this in a master file. Check your code and
make sure it is pointing to the correct task objects.

John
Project MVP
 
L

linsen

No, i am using a single mpp file. There is a project and has some sub tasks.
After that another project and it's subtasks. The first project has a task
named task1 and the second project also has a task named task1. Now the issue
is this. The second project has a task called task2. I want to set a link
between the tasks "task1" and "task2" in the second project and i set the
relation like this:-
project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjTaskLinkType.pjFinishToStart,Missing.Value ).
But in the mpp file, the relation was set between the "task1" in the first
project and the "task2" in the second project. But i want the relation to be
set between the "task1" and "task2" in the second project. Please give a
solution
 
L

linsen

No, i am using a single mpp file. There is a project and has some sub tasks.
After that another project and it's subtasks. The first project has a task
named task1 and the second project also has a task named task1. Now the issue
is this. The second project has a task called task2. I want to set a link
between the tasks "task1" and "task2" in the second project and i set the
relation like this:-
project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjTaskLinkType.pjFinishToStart,Missing.Value ).
But in the mpp file, the relation was set between the "task1" in the first
project and the "task2" in the second project. But i want the relation to be
set between the "task1" and "task2" in the second project.
 
J

John

linsen said:
No, i am using a single mpp file. There is a project and has some sub tasks.
After that another project and it's subtasks. The first project has a task
named task1 and the second project also has a task named task1. Now the issue
is this. The second project has a task called task2. I want to set a link
between the tasks "task1" and "task2" in the second project and i set the
relation like this:-
project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjTaskLinkT
ype.pjFinishToStart,Missing.Value ).
But in the mpp file, the relation was set between the "task1" in the first
project and the "task2" in the second project. But i want the relation to be
set between the "task1" and "task2" in the second project.

Linsen,
OK, your first mistake is to have identical task names in more than one
place. In fact those tasks are different - one belongs to project 1 and
the other belongs to project 2. Each task should have a unique task name
shared by no other task and if you are putting more than one project
into a single file, then each task must have a unique task name within
that whole file. Do that and your problem will go away.

John
Project MVP
 
A

Alejandro Rivera

Hi, im alex from mexico mmm i have read project server 2007 tutorial but i cant link taks between project, do you know the right way to link task between projects
or maybe a trick

thanks



linse wrote:

how to add a link between 2 tasks in ms project
12-Sep-07

i have an issue. there are 2 projects and each project has some 5 subtasks.
in the second project i want to set a link between 2 tasks and did it using
the function LinkPredecessors. but in the result, the link was formed between
the task in the second project and a task in the first project, because both
of them had the same names. but actually i want the link between the tasks in
the second project. please help me out.

Previous Posts In This Thread:

how to add a link between 2 tasks in ms project
i have an issue. there are 2 projects and each project has some 5 subtasks.
in the second project i want to set a link between 2 tasks and did it using
the function LinkPredecessors. but in the result, the link was formed between
the task in the second project and a task in the first project, because both
of them had the same names. but actually i want the link between the tasks in
the second project. please help me out.

Re: how to add a link between 2 tasks in ms project
linsen
It sounds like your code is using a task object form one file as the
"expression" part of the syntax and a task object from the second file
as the "Tasks" object of the syntax, although it's not clear why the
code would even be able to access objects from both files, unless
perhaps you were trying to do this in a master file. Check your code and
make sure it is pointing to the correct task objects

Joh
Project MVP

No, i am using a single mpp file. There is a project and has some sub tasks.
No, i am using a single mpp file. There is a project and has some sub tasks.
After that another project and it's subtasks. The first project has a task
named task1 and the second project also has a task named task1. Now the issue
is this. The second project has a task called task2. I want to set a link
between the tasks "task1" and "task2" in the second project and i set the
relation like this:
project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjTaskLinkType.pjFinishToStart,Missing.Value )
But in the mpp file, the relation was set between the "task1" in the first
project and the "task2" in the second project. But i want the relation to be
set between the "task1" and "task2" in the second project. Please give a
solutio

:

No, i am using a single mpp file. There is a project and has some sub tasks.
No, i am using a single mpp file. There is a project and has some sub tasks.
After that another project and it's subtasks. The first project has a task
named task1 and the second project also has a task named task1. Now the issue
is this. The second project has a task called task2. I want to set a link
between the tasks "task1" and "task2" in the second project and i set the
relation like this:
project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjTaskLinkType.pjFinishToStart,Missing.Value )
But in the mpp file, the relation was set between the "task1" in the first
project and the "task2" in the second project. But i want the relation to be
set between the "task1" and "task2" in the second project.

:

Re: how to add a link between 2 tasks in ms project
Linsen
OK, your first mistake is to have identical task names in more than one
place. In fact those tasks are different - one belongs to project 1 and
the other belongs to project 2. Each task should have a unique task name
shared by no other task and if you are putting more than one project
into a single file, then each task must have a unique task name within
that whole file. Do that and your problem will go away.

John
Project MVP


Submitted via EggHeadCafe - Software Developer Portal of Choice
Free Online Courses Available for Eggheadcafe.com Users
http://www.eggheadcafe.com/tutorial...8-fc3cf6855293/free-online-courses-avail.aspx
 
A

Andrew Lavinsky

Hello Alex from Mexico, this is Andrew in South Texas. I guess that sort
of makes us neighbors.

You need to create a master project to create interproject links. You have
two ways to accomplish that:

1) In the Project Center view, select the projects you would like to link
by clicking on the square to the very left of the row. Then select Edit.
The projects will open in Microsoft Project.
2) Open Microsoft Project, in a new project, select the Insert option, and
Insert the Projects you need into the master project.

Add links as needed.

Now for the important part....

When you save the changes, select "No" to save your new project. Immediately
after that prompt, it will ask you to save the subprojects, click yes on
that. Then you will have your interproject links.


- Andrew Lavinsky
Blog: http://blogs.catapultsystems.com/epm
Hi, im alex from mexico mmm i have read project server 2007 tutorial
but i cant link taks between project, do you know the right way to
link task between projects

or maybe a trick

thanks

linse wrote:

how to add a link between 2 tasks in ms project
12-Sep-07
i have an issue. there are 2 projects and each project has some 5
subtasks. in the second project i want to set a link between 2 tasks
and did it using the function LinkPredecessors. but in the result, the
link was formed between the task in the second project and a task in
the first project, because both of them had the same names. but
actually i want the link between the tasks in the second project.
please help me out.

Previous Posts In This Thread:

how to add a link between 2 tasks in ms project
i have an issue. there are 2 projects and each project has some 5
subtasks.
in the second project i want to set a link between 2 tasks and did it
using
the function LinkPredecessors. but in the result, the link was formed
between
the task in the second project and a task in the first project,
because both
of them had the same names. but actually i want the link between the
tasks in
the second project. please help me out.
Re: how to add a link between 2 tasks in ms project
linsen,
It sounds like your code is using a task object form one file as the
"expression" part of the syntax and a task object from the second file
as the "Tasks" object of the syntax, although it's not clear why the
code would even be able to access objects from both files, unless
perhaps you were trying to do this in a master file. Check your code
and
make sure it is pointing to the correct task objects.
John
Project MVP
No, i am using a single mpp file. There is a project and has some sub
tasks.

No, i am using a single mpp file. There is a project and has some sub
tasks.

After that another project and it's subtasks. The first project has a
task

named task1 and the second project also has a task named task1. Now
the issue

is this. The second project has a task called task2. I want to set a
link

between the tasks "task1" and "task2" in the second project and i set
the

relation like this:-

project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjT
askLinkType.pjFinishToStart,Missing.Value ).

But in the mpp file, the relation was set between the "task1" in the
first

project and the "task2" in the second project. But i want the relation
to be

set between the "task1" and "task2" in the second project. Please give
a

solution

:

No, i am using a single mpp file. There is a project and has some sub
tasks.

No, i am using a single mpp file. There is a project and has some sub
tasks.

After that another project and it's subtasks. The first project has a
task

named task1 and the second project also has a task named task1. Now
the issue

is this. The second project has a task called task2. I want to set a
link

between the tasks "task1" and "task2" in the second project and i set
the

relation like this:-

project.Tasks["task2"].TaskDependencies.Add(project.Tasks["task1"],PjT
askLinkType.pjFinishToStart,Missing.Value ).

But in the mpp file, the relation was set between the "task1" in the
first

project and the "task2" in the second project. But i want the relation
to be

set between the "task1" and "task2" in the second project.

:

Re: how to add a link between 2 tasks in ms project
Linsen,
OK, your first mistake is to have identical task names in more than
one
place. In fact those tasks are different - one belongs to project 1
and
the other belongs to project 2. Each task should have a unique task
name
shared by no other task and if you are putting more than one project
into a single file, then each task must have a unique task name within
that whole file. Do that and your problem will go away.
John
Project MVP
Submitted via EggHeadCafe - Software Developer Portal of Choice

Free Online Courses Available for Eggheadcafe.com Users

http://www.eggheadcafe.com/tutorials/aspnet/5261083e-6e03-4b25-8728-fc
3cf6855293/free-online-courses-avail.aspx
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top