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
GetProperty
Viewed 578 times since Thu, Jul 1, 2010
PropertyItem
Viewed 623 times since Thu, Jul 1, 2010
GetPropertyResultAsInteger
Viewed 588 times since Thu, Jul 1, 2010
ChildItem
Viewed 747 times since Thu, Jul 1, 2010
FullPath
Viewed 625 times since Thu, Jul 1, 2010