Is there any way to read the $ parameters in runtime? i'm working in application to transform a panel to a configuration in a database and i need to read the $parameters.
The users inserts panels references in the panel and later makes the conversion.
Thanks!!
read $ parameters in runtime
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: read $ parameters in runtime
Hello,
to read the $-parameters from a panel you can use the CTRL-functions
getDollarParams()
getDollarParamsFromPanel()
getDollarValue()
For detailed information please have a look at the online help.
Best Regards
Leopold Knipp
Senior Support Specialist
to read the $-parameters from a panel you can use the CTRL-functions
getDollarParams()
getDollarParamsFromPanel()
getDollarValue()
For detailed information please have a look at the online help.
Best Regards
Leopold Knipp
Senior Support Specialist
- xavi.aran
- Posts:63
- Joined: Thu Apr 21, 2011 1:21 pm
Re: read $ parameters in runtime
Hello,
the getDollarParams is working only in the panel for reference configuration in GEDI. In runtime doesn't work....why?
the getDollarParamsFromPanel only returns me the name of the $Parameters.
the GetDollarValue is for use inside the panel that have the $Parameter.
I tried this 3 options before....i have some references in a panel with various $parameters each one. I configure in GEDI.
In runtime, i need to execute a script that get all the references and get its $parameters and his value.
The only solution i find is put in each reference one text edit invisible and put this information inside in runtime to read later by script...but is not a very 'clean' solution.
Thanks!!
the getDollarParams is working only in the panel for reference configuration in GEDI. In runtime doesn't work....why?
the getDollarParamsFromPanel only returns me the name of the $Parameters.
the GetDollarValue is for use inside the panel that have the $Parameter.
I tried this 3 options before....i have some references in a panel with various $parameters each one. I configure in GEDI.
In runtime, i need to execute a script that get all the references and get its $parameters and his value.
The only solution i find is put in each reference one text edit invisible and put this information inside in runtime to read later by script...but is not a very 'clean' solution.
Thanks!!
- rgreino
- Posts:4
- Joined: Fri Jun 22, 2012 5:01 pm
Re: read $ parameters in runtime
Hello Xavi,
I am not sure I am understanding what you want to do, are you trying to set from the parent panel, at run-time, the $params of the reference panels that were added in GEDI? ETM guys will let us know but I don't think that is possible. May I ask what are you trying to do? What is coming from that database (external DB?) you mention? Is this some online values? Or rather static information like some geometry values or so? I have the feeling that your issues should be approached in a different way and probably giving some more details will help some expert out there to give you a hand.
Best regards,
Bobby
I am not sure I am understanding what you want to do, are you trying to set from the parent panel, at run-time, the $params of the reference panels that were added in GEDI? ETM guys will let us know but I don't think that is possible. May I ask what are you trying to do? What is coming from that database (external DB?) you mention? Is this some online values? Or rather static information like some geometry values or so? I have the feeling that your issues should be approached in a different way and probably giving some more details will help some expert out there to give you a hand.
Best regards,
Bobby
- xavi.aran
- Posts:63
- Joined: Thu Apr 21, 2011 1:21 pm
Re: read $ parameters in runtime
Thanxs Robet, i explain a litle more...
I only want that a costumer put my defined objects in a GEDI panel with its $parameters values.
Later, in runtime, i need to run a script for read this $parameters.
I need this information to simplified the creation structures and tags in a WinCC OA database.
In this way, you only draw panels and execute a script to generate the structures in database.
I only want that a costumer put my defined objects in a GEDI panel with its $parameters values.
Later, in runtime, i need to run a script for read this $parameters.
I need this information to simplified the creation structures and tags in a WinCC OA database.
In this way, you only draw panels and execute a script to generate the structures in database.
- rgreino
- Posts:4
- Joined: Fri Jun 22, 2012 5:01 pm
Re: read $ parameters in runtime
Sorry Xavi but I am afraid it is not more clear to me now. Let me try understand better:
>> i need to run a script for read this $parameters.
Where would this script run? In a ctrl manager? Is it a script that runs in your reference panels?
>> Later, in runtime, i need to run a script for read this $parameters.
Sounds like you want your customer to leave this $parameters empty and then you expect to fill them from a script or something like that. I don't think $parameter are meant to be be used like that. What you could do is to run in the initialize of the parent panel the famous getShapes() function and then do some parsing on the object names. You could rename your objects with their initialize script doing something like this.name = this.name +"" + $dollarParam. This is a bit equivalent to have those hidden input texts though.
>> I need this information to simplified the creation structures and tags in a WinCC OA database.
You need the information (on how to access this $params??) to create some structure in a WinCC OA database (I guess RAIMA internal DB?).
>> In this way, you only draw panels and execute a script to generate the structures in database
Do I understand that you want your customer to draw a panel and by reading it later with a script then generate a datapoint structure? If this is the case then why don't you just provide an interface to your customer to add this symbols during run-time? This would be like a run-time editor for your client. They will fill in the panel will this editor, eventually using the new handy drag and drop functionality, and while doing this you willl be writing the information in your DP structure or other external DB. Then, you would also provide a panel that when started will read the information saved bythat editor in the DB to show the content to the user.
Otherwise, I have quite some experience in generating PVSS panels from relational databases and other things like that so if that's what you are trying to do drop me some more lines but please note that the more details you provide to help to understand, not only your technical question but also what you are aiming for, the more chances you have to get the right answers from some of those experts that are reading us
>> i need to run a script for read this $parameters.
Where would this script run? In a ctrl manager? Is it a script that runs in your reference panels?
>> Later, in runtime, i need to run a script for read this $parameters.
Sounds like you want your customer to leave this $parameters empty and then you expect to fill them from a script or something like that. I don't think $parameter are meant to be be used like that. What you could do is to run in the initialize of the parent panel the famous getShapes() function and then do some parsing on the object names. You could rename your objects with their initialize script doing something like this.name = this.name +"" + $dollarParam. This is a bit equivalent to have those hidden input texts though.
>> I need this information to simplified the creation structures and tags in a WinCC OA database.
You need the information (on how to access this $params??) to create some structure in a WinCC OA database (I guess RAIMA internal DB?).
>> In this way, you only draw panels and execute a script to generate the structures in database
Do I understand that you want your customer to draw a panel and by reading it later with a script then generate a datapoint structure? If this is the case then why don't you just provide an interface to your customer to add this symbols during run-time? This would be like a run-time editor for your client. They will fill in the panel will this editor, eventually using the new handy drag and drop functionality, and while doing this you willl be writing the information in your DP structure or other external DB. Then, you would also provide a panel that when started will read the information saved bythat editor in the DB to show the content to the user.
Otherwise, I have quite some experience in generating PVSS panels from relational databases and other things like that so if that's what you are trying to do drop me some more lines but please note that the more details you provide to help to understand, not only your technical question but also what you are aiming for, the more chances you have to get the right answers from some of those experts that are reading us
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: read $ parameters in runtime
You can get the dollars from any PanelRef inside a panel by e.g.:
hope that helps.
Code: Select all
mapping map;
getValue("PANEL_REF0", "dollars", map);
- xavi.aran
- Posts:63
- Joined: Thu Apr 21, 2011 1:21 pm
Re: read $ parameters in runtime
Thanks!!! This is exactly i need!!!!!!!!