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.
Panel reference/ Object name replace with other values
- paramesh1985
- Posts:81
- Joined: Thu Sep 25, 2014 6:03 am
Panel reference/ Object name replace with other values
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Panel reference/ Object name replace with other values
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
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
Hi,
As per the request from the customer. We want to keep the reference name and $DP name as unique.
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
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
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
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.
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
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.
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
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.
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
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.