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
DoRecord
Viewed 494 times since Thu, Jul 1, 2010
GetPropertyResultAsInteger
Viewed 527 times since Thu, Jul 1, 2010
GetItem
Viewed 537 times since Thu, Jul 1, 2010
GetPropertyResultAsFloat
Viewed 488 times since Thu, Jul 1, 2010
NewItemEx
Viewed 449 times since Fri, Oct 21, 2011