Syntax

code

Function: IItem.NewSection(AName: String = ''): IItem;


Description

Creates a new section for the Item.
If the Item is not a draw object this function returns Nil.


Code Reference


code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

var

  ps: IPlanSwift;

  est: IItem;

  itm: IItem;

  sect: IItem;

begin

  // Create Planswift Interface

  ps := coPlanswift.Create;

  // Get the Estimating Tab

  est := ps.GetItem('Job\Takeoff');

  // Create a New Item

  itm := est.NewItem('Area', 'NewSection Example');

  // Create a new Section for the Area Item

  sect := itm.NewSection('NewSection Section');

  // Start recording the section

  sect.DoRecord;

  // Free Planswift

  ps := nil;

end;