Syntax

code

Function: IItem.Edit(ShowAdvanced: Boolean = True): Boolean;


Description

Displays the Item in the Editor Dialog.


Code Reference

code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

var

  ps: IPlanSwift;

  est: IItem;

  itm: IItem;

  sect: IItem;

  rslt: Boolean;

begin

  // Create Planswift Interface

  ps := coPlanswift.Create;

  // Get The Estimating Tab

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

  // Create a New Area Item

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

  // Open the Property Editor

  rslt := itm.Edit(true);

  // if ok was pressed then record the item else delete the item

  if rslt then

  begin

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

    sect.DoRecord;

  end

  else

  begin

    itm.Delete;

  end;

  // Free planswift

  ps := nil;