Syntax

code

Function: IItem.GetProperty(ItemPath, PropertyName: String): IPropertyObject;


Description

Returns the IPropertyObject specified by ItemPath and PropertyName
Returns Nil if the Item or Property is not found.


Code Reference


code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

var

  ps: IPlanSwift;

  est: IItem;

  itm: IItem;

  prop: IPropertyObject;

begin

  // Create Planswift Inteface

  ps := coPlanswift.Create;

  // get the Estimating Tab

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

  // Create a new Item

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

  // Get the Name Property

  prop := itm.GetProperty('Name');

  // Show the name of the property

  ShowMessage(prop.Name);

  // Free Planswift

  ps := nil;