10/24/2014 2:22 PM | |
Joined: 9/19/2009 Last visit: 10/20/2024 Posts: 459 Rating: (85) |
Hi I would like to know if is possible use the below code. I have extracted from this Example. I´m trying to use it, from an Action or Function, but didn´t work. If I put a button or another object and use this code, works perfectly if only there is a BaseScreen. But if I use the following architecture don´t work, and I don´t know how to solved PDL -> PICTURE WINDOWS -> PDL2. Here is where I must to use it. I know that I can use VBScript, but all my code is written with C, and now I have to make some changes. You can use microsoft listbox. To populate ms listboxwith c script: #define GetObject GetObject __object *pdl=NULL; __object *pic=NULL; __object *obj=NULL; pdl = __object_create("PDLRuntime"); pic=pdl->GetPicture(lpszPictureName); obj=pic->GetObject("listbox1"); obj->Clear(); obj->AddItem("TEST1"); obj->AddItem("TEST2"); __object_delete(obj); __object_delete(pic); __object_delete(pdl); By the way, Someone knows if there is some user manual working with Objects and C code. Thanks advanced |
If my answer help you, use the Thanks or Rate Button, It is free of charge :-) |
|
10/24/2014 4:26 PM | |
Joined: 9/19/2009 Last visit: 10/20/2024 Posts: 459 Rating: (85) |
Solved. If anyone has the same problem From user Manual. "lpszPictureName" is the name of the picture. If you configure an action on a property or a "Mouse-click" event in WinCC, the name of the picture is provided as "lpszPictureName" in the action. The picture name has the following structure: <BASE PICTURE NAME>.<PICTURE WINDOW NAME>:<PICTURE NAME>. ... .<Picture window name>:<Picture name>. #define GetObject GetObject __object *pdl=NULL; __object *pic=NULL; __object *obj=NULL; pdl = __object_create("PDLRuntime"); pic=pdl->GetPicture(<BASE PICTURE NAME>.<PICTURE WINDOW NAME>:<PICTURE NAME>); obj=pic->GetObject("listbox1"); obj->Clear(); obj->AddItem("TEST1"); obj->AddItem("TEST2"); __object_delete(obj); __object_delete(pic); __object_delete(pdl); Thank you |
If my answer help you, use the Thanks or Rate Button, It is free of charge :-) |
|
This contribution was helpful to2 thankful Users |
Follow us on