To open any link in a new tab, preserving your position in the current article, just hold down the <CTRL> key on your keyboard before clicking the link or click using your mouse wheel.

CancelTool

CancelTool



Cancels the currently active tool in PlanSwift.



Syntax:

Procedure: CancelTool;

Code Reference:

  1. Create a New Forms Application
  2. Add a PlanSwift to the References (Planswift_Tlb)
  3. Add a button to the form
  4. Copy code below to the onclick event of the button
  5. Open PlanSwift and select a digitizer object
  6. Compile and run


API Calls

Delphi

Using PlanSwift Object Model
var
  Ps: IPlanSwift;
  Takeoff, itm: IItem;

begin
  Ps := Planswift;
  // Get the Takeoff Folder
  Takeoff := Ps.GetItem('\Job\Takeoff');
  // Create new Item and Begin Recording
  itm := Takeoff.NewItem('Linear', 'New Linear');
  itm.DoRecord;
  // Cancel the digitization before the user can stop it
  Ps.CancelTool;
  Ps := nil;
end;


C#

Using IItem Object Model
public class PlanswiftApi
{
    private PlanSwift Planswift { get; }
    public PlanswiftApi()
    {
        Planswift = new PlanSwift();
    }
    public void CreateAndRecordItem(string type, string name)
    {
        var takeoff = Planswift.GetItem("\\Job\\Takeoff");
        var item = takeoff.NewItem(type, name);
        item.DoRecord();
    }
    public void TestCancelTool()
    {
        // Create the Item and Begin Digitizing
        CreateAndRecordItem("Linear", "My Linear");
    
        // Cancel the Digitizer before the user can stop recording
        Planswift.CancelTool();
    }
}
Using PlanSwift Object Model
Coming soon


VB/VBA (OLE)

Using IItem Object Model
Coming soon
Using PlanSwift Object Model
Coming soon


Copyright 2023 ConstructConnect