Panel reference/ Object name replace with other values

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
8 posts • Page 1 of 1
paramesh1985
Posts:81
Joined: Thu Sep 25, 2014 6:03 am

Panel reference/ Object name replace with other values

Post by paramesh1985 »

Hi,


I want to replace the panel_reference object name with dp name via some script instead of manual changes in Gedi.


I can able to read panel_reference object name but i am not able to replace the name with other values.

Is there is any other way.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Panel reference/ Object name replace with other values

Post by leoknipp »

Hello,

according to the WinCC OA help the attribute "refName" can only be read.
Why do you want to change the name for the reference?

Best Regards
Leopold Knipp
Senior Support Specialist

paramesh1985
Posts:81
Joined: Thu Sep 25, 2014 6:03 am

Re: Panel reference/ Object name replace with other values

Post by paramesh1985 »

Hi,

As per the request from the customer. We want to keep the reference name and $DP name as unique.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Panel reference/ Object name replace with other values

Post by leoknipp »

Hello,

the reference name is an internal name which is not visible at the panel during runtime.
The name is used for addressing graphical objects and their properties during runtime.

Please clarify with your customer if it is really necessary to change the internal name.

Best Regards
Leopold Knipp
Senior Support Specalist

paramesh1985
Posts:81
Joined: Thu Sep 25, 2014 6:03 am

Re: Panel reference/ Object name replace with other values

Post by paramesh1985 »

hi,

Yes you are correct. We also conveyed the same message. But they want instead of panel_refxx dp name.

I tried with some script i can able to read the object name ; but not able to set the object name.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Panel reference/ Object name replace with other values

Post by Gertjan van Schijndel »

The reference name is also shown in errors, so a good name could make it easier to find the error location.

Changing the reference name would be possible by editing the panel file.

paramesh1985
Posts:81
Joined: Thu Sep 25, 2014 6:03 am

Re: Panel reference/ Object name replace with other values

Post by paramesh1985 »

Yes i know.

But how we will change via script instead of changing by manually.

My intention is read the $DP value from the panel and set the same value in the refname of object using script.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Panel reference/ Object name replace with other values

Post by Gertjan van Schijndel »

The xml file format is easier to understand, so you could use the functions 'xmlDocumentFromFile', 'xmlDocumentToFile' to read and write the file. The other xml functions can be used to change the file.

8 posts • Page 1 of 1