Share via


Application.LayoutSelectionNow Method

Project Developer Reference

Positions the selected task boxes in the active Network Diagram view according to its layout options.

Syntax

expression.LayoutSelectionNow

expression   A variable that represents an Application object.

Return Value
Boolean

Remarks

Layout options can be set with the BoxLayout and BoxLinks methods.

The LayoutSelectionNow method is only available when a Network Diagram view is active.

Example
The following example positions the selected boxes in a top-down layout.

Visual Basic for Applications
  Sub Layout_SelectionNow()
    
   'Activate Network Diagram view
    ViewApply Name:="Network &Diagram"
BoxSet Action:=pjBoxAddToSelection, TaskID:=2
BoxLayout LayoutMode:=pjLayoutManual, LayoutScheme:=pjLayoutTopDownByDay

<strong class="bterm">LayoutSelectionNow</strong>

End Sub

See Also