Syntax

code

Function: IItem.GetPropertyResultAsFloat(ItemPath, PropertyName: String; Default: Double = 0): Double;


Description

Attempts to return the given property value as a floating point value. If the calculated property value can not be converted, the value supplied by Default is returned.


Code Reference


code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

var

  ps: IPlanSwift;

  est: IItem;

  itm: IItem;

begin

  // Create the Planswift Interface

  ps := coPlanswift.Create;

  // Get the Estimating Tab

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

  // Get the Selected item

  itm := ps.SelectedItem;

  // Get the Qty Value of the Area

  ShowMessage('Property Formula: ' + FloatToStr(itm.GetPropertyResultAsFloat

        ('Qty', 0)));

  // Free Planswift

  ps := nil;

end;