canvasManager
canvasManager
canvasManager is an administrator of canvases. Main function is opening a canvas.
Methods
Return Type |
Method |
Description |
canvas |
Obtain the currently active canvas. |
|
|
close() |
Close the currently active canvas. |
canvas |
open( filename ) |
Open canvases. If the canvas already opened, activate it. |
canvas |
open( filename, replacePointNames ) |
When opening a canvas, change the name of points data linked on the canvas. |
|
openSessionCanvas( session, filename, str ) |
When executing multi HMI in a PC, it used to open another HMI from the current one. |
waitForClose() |
After the canvas opened, wait for it close. |
Obtain the currently active canvas. Example)
canvasManager_OBJ = canvasManager.activeCanvas(); << Obtain the currently active canvas.
|
Close the currently active canvas. Example)
canvasManager.close(); << Close the currently active canvas.
|
||||
|
It is used to open the canvas. If it is already opened, activate it. ㆍ Enter the name of canvas including '.pws' to name. 1) If the canvas is in the project folder : Enter the file name. 2) If the canvas is not in the project folder : Enter the entire path. ㆍ Using a canvas object, the user can use canvas methods. Example)
canvas_OBJ = canvasManager.open('MainCanvas.pws'); << Open that canvas canvas_OBJ = canvasManager.open('C:/Project/MainCanvas.pws'); << Open the canvas including entire path.
|
||||
|
After the canvas opened, and wait for it closed. waitForClose is used to process follow-up tasks. For example, it opens the pop-up when adding a schedule, enters the schedule information, waits for the closing pop-up, brings the entered schedule, and saves it. Example)
canvasManager_OBJ = canvasManager.open('Screen.pws') << Open the canvas inside the project folder. canvasManager_OBJ.waitForClse() << Wait for the canvas closed. schdule_Name = canvasManager_OBJ.getObject('schName') << Obtain the schedule before the canvas closed. print schdule_Name.getText()
|