Project 2000. The Network Diagram View, страница 8

expression

Optional. An expression that returns an Application object.

Name

Required String. The name of the template to edit, create, copy or delete.

Action

Required Long. The operation to perform on the template. Can be one of the following PjDataTemplate constants:

pjDataTemplateNew pjDataTemplateCopy

pjDataTemplateRename pjDataTemplateDelete

NewName

Optional String. The new name for an existing box template (Action is pjDataTemplateRename) or a copied box template (Action is pjDataTemplateCopy). For copying and renaming box templates, NewName is required and must not be an existing box template name. If Action is pjDataTemplateRename or pjDataTemplateDelete, NewName is ignored.

Remarks

To determine if a box template exists, rename the template to the same name (that is set NewName = Name) and check for success.

BoxCellLayout Method

Sets the cell layout and size properties for a Network Diagram box template.

Syntax

expression.BoxCellLayout (Name, CellRows, CellColumns, CellWidth, MergeCells)

expression

Optional. An expression that returns an Application object.

Name

Required String. The name of the box template to edit.

CellRows

Optional Long. The number of rows of cells in the box template. Can be one of the following PjRowCol constants: pjRowCol1, pjRowCol2, pjRowCol3, or pjRowCol4.

CellColumns

Optional Long. The number of columns of cells in the box template. Can be one of the following PjRowCol constants: pjRowCol1, pjRowCol2, pjRowCol3, or pjRowCol4.

CellWidth

Optional Integer. The percentage between 100 and 200 by which to enlarge the width of every cell in the box template.

MergeCells

Optional Boolean. True if blank cells will be merged with the cell to the left.

Remarks

If no arguments other than Name are specified, the BoxCellLayout method has no effect.

The initial layout of a new box template is 2 rows by 2 columns of normal (100%) width cells with cell merging enabled.

BoxCellEdit Method

Sets the properties for an individual cell in a Network Diagram box template.

Syntax

expression.BoxCellEdit (Name, Cell, FieldName, Font, FontSize, FontColor, Bold, Italic, Underline, HorizontalAlignment, VerticalAlignment, TextLineslimit, ShowLabel, Label, DateFormat)

expression

Optional. An expression that returns an Application object.

Name

Required String. The name of the box template containing the cell to edit.

Cell

Required Long. The cell being edited. Can be one of the following PjCell constants:

pjCell1_1 pjCell1_2 pjCell1_3 pjCell1_4

pjCell2_1 pjCell2_2 pjCell2_3 pjCell2_4

pjCell3_1 pjCell3_2 pjCell3_3 pjCell3_4

pjCell4_1 pjCell4_2 pjCell4_3 pjCell4_4

FieldName

Optional Long. The name of the field to display in the cell. Can be one of the following PjField constants:

PjTaskActualCost pjTaskActualDuration (that is, all pjTask* values -- omitted for the sake of brevity) pjTaskWorkVariance

Font

Optional String. The name of the font.

FontSize

Optional Integer. The size of the font in points.