Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 2.92 KB

Project.Application.BoxLinksEx.md

File metadata and controls

69 lines (43 loc) · 2.92 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.BoxLinksEx method (Project)
vbapj.chm2158
vbapj.chm2158
project-server
Project.Application.BoxLinksEx
f6292e01-3f4a-3b83-e86c-2316c83b2509
06/08/2017
medium

Application.BoxLinksEx method (Project)

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

Name Required/Optional Data type Description
Style Optional Long Specifies the style of link lines. Can be one of the following PjLinkStyle constants: pjLinkStraight or pjLinkRectilinear.
ShowArrows Optional Boolean True if link lines have arrows showing the direction of the link; otherwise, False.
ShowLabels Optional Boolean True if link lines have labels showing the link type (FS, SS, SF, or FF); otherwise, False.
ColorMode Optional Long Specifies how the color of link lines is determined. Can be one of the PjLinkColorMode constants.
CriticalColor Optional Long The 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.
NoncriticalColor Optional Long The 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 the BoxLinks method.

[!includeSupport and feedback]