Siemens WinCC SP2 GetObjectA

P

Thread Starter

Pieter Theuns

I tried to use this script, but it didn't work:

// Get the Graphics Designer Runtime Application Automation Object
App = __object_create("PDLRuntime");
if (!App)
{
printf("Failed to create Application Object\r\n"); return;
}
// Get Actual Picture Object
Pic = App->GetPicture(lpszPictureName); //complete path
if (!Pic)
{
printf("Failed to create Picture Object\r\n");
__object_delete(App);
return;
}
// Get the Object of the required control named "MyControl"
//printf("Amount of objects in picture %d\r\n",Pic->ObjectCount());
Ocx = Pic->GetObject("BarTrend");
if (!Ocx)
{
printf("Failed to create OCX Object\r\n");
__object_delete(App);
__object_delete(Pic);
return;
}
//Call AktiveX Method "Import"
//Ocx->Import("");

__object_delete(App);
__object_delete(Pic);
__object_delete(Ocx);

With this script I get the diagnostic message that it doesn't recognise "GetObjectA"
 
Top