Home » Categories » Developer Documents » COM Object Model » IPlanswift » IItems » Functions

DeleteItem

Syntax

Function: IItem.DeleteItem(ItemPath: String): Boolean;

Description

Deletes the item specified by ItemPath from the system.

Code Reference

var
  ps: IPlanSwift;
  est: IItem;
  i: Integer;
  itm: IItem;
begin
  // Create Planswift Interface
  ps := coPlanswift.Create;
  // Get the Estimating Tab
  est := ps.GetItem('Job\Takeoff');
  // Loop through all items on the first level
  for i := est.ChildCount - 1 downto 0 do
  begin
    // Get the item at index i
    itm := est.ChildItem[i];
    // delete the item
    itm.Delete;
  end;
  // Free Planswift
  ps := nil;
end;
   

[VB Example Needed]

[CSharp Example Needed]

Article Rating (0 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
NewProperty
Viewed 507 times since Thu, Jul 1, 2010
DoRecord
Viewed 495 times since Thu, Jul 1, 2010
GetItem
Viewed 542 times since Thu, Jul 1, 2010
GetPropertyResultAsBoolean
Viewed 523 times since Thu, Jul 1, 2010
FullPath
Viewed 549 times since Thu, Jul 1, 2010