Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.BoxLinksEx Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Specifies the appearance of link lines in the active Network Diagram view, where colors can be hexadecimal values.

Syntax

expression. BoxLinksEx( ** Style, ** ShowArrows, ** ShowLabels, ** ColorMode, ** CriticalColor, ** NoncriticalColor )

expression An expression that returns an Application object.

Parameters

NameRequired/OptionalData TypeDescription
StyleOptionalLongSpecifies the style of link lines. Can be one of the following PjLinkStyle constants: pjLinkStraight or pjLinkRectilinear.
ShowArrowsOptionalBooleanTrue if link lines have arrows showing the direction of the link; otherwise, False.
ShowLabelsOptionalBooleanTrue if link lines have labels showing the link type (FS, SS, SF, or FF); otherwise, False.
ColorModeOptionalLongSpecifies how the color of link lines is determined. Can be one of the PjLinkColorMode constants.
CriticalColorOptionalLongThe color of link lines between critical tasks. Can be a hexadecimal value for the RGB color, where red is the last byte. For example, the value &;HFF0000 is blue and &;H00FFFF is yellow. The default value is 0, which does not change the previous color.
NoncriticalColorOptionalLongThe color of link lines between noncritical tasks. Can be a hexadecimal value; the default value is 0, which does not change the previous color.

Return Value

Boolean

Remarks

If no arguments are specified, the BoxLinksEx method has no effect. If ColorMode is pjColorModePredecessor, the NoncriticalColor and CriticalColor parameters are ignored.

Example

The following example shows link labels and then sets critical links to a purple color and noncritical links to a teal color.

Sub BoxLink_ChangeColor() 
    'Activate the Network Diagram view 
    ViewApply Name:="Network Diagram" 

    BoxLinksEx Style:=pjLinkRectilinear, ShowArrows:=True, ShowLabels:=True, ColorMode:=pjColorModeCustom, _ 
        CriticalColor:=&;HBB00BB, noncriticalcolor:=&;H999900 
End Sub

Note If you use any of the PjColor enumeration constants for the CriticalColor or NoncriticalColor parameters, the color will be nearly black. For example, the value of pjGreen is 9, which in the BoxLinksEx method is a very dark red. To use only the sixteen colors available with PjColor constants, use theBoxLinks method.

© 2018 Microsoft