WinCC V6.2 close picture window during script

P

Thread Starter

Paul Dirkson

I want to open a picture window in a different page. So i have a page called TEST.PDL and TEST2.PDL I want to call the picture window from Test.pdl in TEST2.PDL

The C code for this I can't find it on the internet.

This is the code I'm using right now:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
OpenPicture("TEST.PDL"); //Return-Type: void
}


#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
SetVisible(lpszPictureName,"TEST2.PDL",1-GetVisible(lpszPictureName,"TEST2.PDL"));
}

Please HELP!

Greetings,

Paul
 
Hi,

with WinCC V6.2 or higher version You can you both VB Script or ANSI-C Script for programming your project. In this your problem, you can you the solution as below:

- In Picture TEST2.PDL you creat a picture window named "PictureWindow" and a button. When you click the button the Picture TEST.PDL will appare in the picture window

- Code for commissioning: in the event click of the button you can set the below commands:

dim tg
set tg=ScreenItems("PictureWindow")
tg.OnTop=True
tg.ScreenName="TEST"
 
Top