Syntax

code

Function: IItem.NewItem(ItemType: String; AName: String = ''): IItem;


Description

Creates a new child item and returns the new item.


Code Reference


code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

var

  ps: IPlanSwift;

  est: IItem;

  itm: IItem;

begin

  // Create the Planswift Interface

  ps := coPlanswift.Create;

  // Get the Estimating Tab

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

  // Create a New Area Item

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

  // Get The Item By -GUID

  itm := itm.GetItemByGUID(itm.GUID);

  // Free Planswift

  ps := nil;

end;