Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Functions - ChildItem

Text:

API Call:Returns the child item at the given index position.

Syntax:

Function: IItem.ChildItem(Index: Integer): IItem;

API Calls

Delphi

Code Block
languagedelphi
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
collapsetrue
var  
ps: IPlanSwift;
  est: IItem;
  i: Integer;
  itm: IItem;
  txt: String;
begin
  // Create Planswift Interface
  ps := coPlanswift.Create;
  // Get the estimating tab
  est := ps.GetItem('Job\Takeoff');
  // Loop Through all Child items on the estimating tab
  for i := 0 to est.ChildCount - 1 do
  begin
    // Get the child item
    itm := est.ChildItem[i];
    // Write the chiled item to the text
    txt := txt + itm.Name + #13#10;
  end;
  // Show the all the child items on the first level
  ShowMessage('First Level estimating Items:' + #13#13 + txt);
  // Free planswift
  ps := nil;


Code Block
languagedelphi
firstline1
titleUsing PlanSwift Object Model
linenumberstrue

C#

Code Block
languagec#
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue


Code Block
languagec#
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue

VB/VBA (OLE)

Code Block
languagevb
firstline1
titleUsing IItem Object Model
linenumberstrue


Code Block
languagevb
firstline1
titleUsing PlanSwift Object Model
linenumberstrue

Pascal Scripting (OLE)

Code Block
firstline1
titleItem Object Model
linenumberstrue


Code Block
titleRoot Object Model
linenumberstrue

Pascal Scripting

Code Block
firstline1
titleItem Object Model
linenumberstrue


Code Block
titleUsing the PlanSwift Object Model
linenumberstrue