Syntax

code

Function: PropertyType: String;


Description

Returns the Type attribute for the property.


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

28

procedure psPropertyType;

var

  ps: IPlanSwift;

  itm: IItem;

  i: Integer;

  prop: IPropertyObject;

  propname,proptype,txt: WideString;

begin

  // Create Planswift Interface

  ps := coplanswift.Create;

  //Get the Selected Item

  itm := ps.SelectedItem;

  //cycle Thorugh all Properties and get name and type

  for i := 0 to itm.propertyCount - 1 do begin

    //Get the first property in the array

    prop := itm.PropertyItem[i];

    //Get the Property Name

    propname := prop.name;

    //Get the Property Type

    proptype := prop.PropertyType;

    //Store Text value

    txt := txt + propname + ': ' + proptype + #13#10;

  end;

  //Show message of all properties

  showMessage(txt);

  //Free the Planswift Interface

  ps := nil;

end;