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
GetPropertyResultAsString
Viewed 551 times since Thu, Jul 1, 2010
GetPropertyResultAsBoolean
Viewed 581 times since Thu, Jul 1, 2010
NewItemEx
Viewed 499 times since Fri, Oct 21, 2011
GetItem
Viewed 615 times since Thu, Jul 1, 2010
PropertyCount
Viewed 524 times since Thu, Jul 1, 2010