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();
}
} |