Versions Compared

Key

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

SetZoom


...

Defines the current "zoom" scale factor for the active page.

...

    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
  nScaleFactor: double;
begin
  PlanSwift.Set_Zoom(nScaleFactor);
end;


FreshDesk Code:


procedure TForm1.psGetZoom(Sender: TObject);
var
  ps: IPlanSwift;
  zoom: string;
begin
//Create Planswift Interface
 ps := coPlanswift.Create;
 //Call inputbox to change the zoom level
 zoom := InputBox('Change Zoom Level','Change Zoom Level',FloatToStr(ps.Zoom));
 //Set Zoom Value
 ps.Zoom := strToInt(zoom);
 //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