GetPropertyResultAsBoolean
...
Function
: GetPropertyResultAsBoolean(ItemPath, PropertyName:
String
; Default:
Boolean
=
False
):
Boolean
;
Code Reference:
- 1. Navigate to Plugin Store->Tool Manager and create a new Plugin
- 2. Set the plugin type to Script Code and open the Editor
- 3. Copy Code into the editor
- 4. press run
API
...
Calls
Delphi
Code Block |
---|
language | delphi |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
collapse | true |
---|
|
procedure psPropertyAsBoolean;
var
ps: IPlanSwift;
pgs: IItem;
i,ii: Integer;
pg: IItem;
begin
//Create the planswift interface
ps := CoPlanswift.Create;
//get the pages folder
pgs := ps.GetItem('Job\Pages');
//cycle through the pages folder and get each
ii := 0;
//on the root level
for i := 0 to pgs.childcount - 1 do begin
//get the child item of the pages folder
pg := pgs.ChildItem[i];
//Check to see if the item is a page
if ps.GetPropertyResultAsBoolean(pg.GUID,'isPage',false) then
ii := ii + 1;
end;
//Show a Messages with the Number of pages
ShowMessage('There are ' + intToStr(ii) + 'pages in the root directory');
//Free the planswift Interface
ps := nil;
end; |
Code Block |
---|
language | delphi |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
C#
Code Block |
---|
language | c# |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
language | c# |
---|
theme | RDark |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
VB/VBA (OLE)
Code Block |
---|
language | vb |
---|
firstline | 1 |
---|
title | Using IItem Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
language | vb |
---|
firstline | 1 |
---|
title | Using PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|
Pascal Scripting (OLE)
Code Block |
---|
firstline | 1 |
---|
title | Item Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
title | Root Object Model |
---|
linenumbers | true |
---|
|
|
Pascal Scripting
Code Block |
---|
firstline | 1 |
---|
title | Item Object Model |
---|
linenumbers | true |
---|
|
|
Code Block |
---|
title | Using the PlanSwift Object Model |
---|
linenumbers | true |
---|
|
|