AddLink Method
The AddLink method creates a new link referencing a pair of objects.
Syntax
Sub AddLink(ByVal dwObj1 As Unsigned Long, ByVal dwObj2 As Unsigned Long, [ByVal dwLinkType As Unsigned Long =1])
Parameters
dwObj1 Required. Integer that specifies the first object, by its reference ID.
dwObj2 Required. Integer that specifies the second object, by its reference ID.
dwLinkType Optional. Integer that specifies the LinkType. The default value is 1. The meaning of link types is as follows:
1 | General relationship |
2 | Tasks are affected by issue |
3 | Tasks as action items for an issue |
4 | Tasks are affected by risk |
5 | Tasks are triggers for the risk |
6 | Tasks are part of the mitigation plan |
7 | Tasks are part of the contingency plan |
Return Values
None.
Remarks
Only one link type can exist for each pair of objects. The parameters dwObj1 and dwObj2 can be placed in either order and are equivalent. The pair will only exist in one row in the table.
If a link type between a pair of objects already exists, the AddLink method does not update the link type.
You can define new link types for custom solutions.
See Also
Applies To
Additional Information
Object Link Provider Reference for Microsoft Office Project Server