Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    1. Create a New Form application
    2. Add a button to the form
    3. Add PlanSwift to reference (Planswift9_tlb in the uses)
    4. Copy code to button onclick event


API

...

Calls

Delphi

Code Block
languagedelphi
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
collapsetrue
//PlanSwift code:
var
  aItem: string;
begin
  aItem := CopyItem(itempath, '\Job\Takeoff', TRUE, FALSE);
end;

//FreshDesk Code:
procedure pscopyitem;var
  ps: IPlanSwift;
  itm: IItem;
  est: IItem;
begin
  //Create the Planswift Interface
  ps := coplanswift.Create;
  //Get the estimating tab
  est := ps.GetItem('Job\Path');
  //Get the Selected Item
  itm := ps.SelectedItem;
  //Copy the selected item to the estimating tab
  //with all child items and sections
  ps.CopyItem(itm.GUID,est.GUID,True,False);
  //free planswift interface
  ps := nil;
end;


C#

Code Block
languagec#
themeRDark
firstline1
titleUsing IItem Object Model
linenumberstrue
collapsetrue
public class PlanswiftApi
{
    private PlanSwift Planswift { get; }
    public PlanswiftApi()
    {
        Planswift = new PlanSwift();
    }
}


Code Block
languagec#
themeRDark
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
Coming soon


VB/VBA (OLE)


Code Block
languagevb
firstline1
titleUsing IItem Object Model
linenumberstrue
Coming soon
Code Block
languagevb
firstline1
titleUsing PlanSwift Object Model
linenumberstrue
Coming soon