Versions Compared

Key

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

SelectItemDialog


...

Displays the Select Item dialog to the user, then returns the selected item.

...

    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:
aitem := planswift.selectitemdialog('My Header', 'My Title', '\Job\Takeoff'); 
if not varisclear(aitem) then
  showmessage(aitem.name);


FreshDesk Code:


procedure TForm1.psSelectItemDialog(Sender: TObject);
var
  ps: IPlanSwift;
  itm: IItem;
begin
  //Create Planswift Interface
  ps := CoPlanswift.Create;
  //Open Item Dialog and select planswift root
  itm := ps.SelectItemDialog('Select An Item','Select An item',ps.Root.FullPath);
  //Show Selected item Name
  ShowMessage(itm.Name + 'Has been selected');
  //Free Planswift
  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