Syntax

code

Function: Get_Zoom: Double;

Description

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

Code Reference

  • 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

code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

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;