Versions Compared

Key

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

ChildCount


...

Returns the number of child items for the item.

...

Procedure: ChildCount: Integer;


API

...

Calls

Delphi

Code Block
languagedelphi
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
collapsetrue
// PlanSwift Code:
Result := Item.ChildCount;


//FreshDesk Code:
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 Items
  for i := 0 to est.ChildCount - 1 do
  begin
    itm := est.ChildItem[i];
    // Add Names of all Items to txt var
    txt := txt + itm.Name + #13#10;
  end;
  // Show Message of all items on 1st level
  ShowMessage('First Level estimating Items:' + #13#13 + txt);
  // Free Planswift Interface
  ps := nil;


C#

Code Block
languagec#
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
collapsetrue
public class PlanswiftApi
{
    private PlanSwift Planswift { get; }
    public PlanSwiftApi()
    {
        Planswift = new PlanSwift();
    }
}


Code Block
languagec#
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
Coming soon

VB/VBA (OLE)

Code Block
languagevb
firstline1
titleUsing IItem Object Model
linenumberstrue
Coming soon


Code Block
languagevb
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
Coming soon