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
GetPropertyResultAsInteger
Viewed 540 times since Thu, Jul 1, 2010
NewSection
Viewed 463 times since Thu, Jul 1, 2010
NewItem
Viewed 512 times since Thu, Jul 1, 2010
GetPropertyResult
Viewed 544 times since Thu, Jul 1, 2010
GetPropertyResultAsBoolean
Viewed 531 times since Thu, Jul 1, 2010