Hi guys!
A question about $-Parameters.
I've created a symbol (say, for a pump) and wrote couple of scripts in it to animate it. In those scripts I used $-Parameters (say, $Motor, $Direction)
When I place this symbol onto the mimic page I can put values into the two $-Parameters. What I see is that the datatype is not always what I expect (seem to be auto-defined, and there are no descriptions). Is there a way to define this somehow?
Moreover, say, for the $Direction parameter I really only want to be able to select from "L" or "R". Is there any way I can define this and maybe have a drop-down selection list? Will some sort of xml file help me?
Thanks in advance!
$-Parameters definition (without ScriptWizard)
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: $-Parameters definition (without ScriptWizard)
Hello,
a $-parameter is always a string. There is no possibility to define a datatype for the $-parameter.
When inserting a reference into a panel you get the standard-dialog for the $-parameters, when you have not defined an own configuration-dialog.
How to create an own configuration-dialog for a reference is described at the following part of the online-help:
Graphics editor (GEDI) --> The property sheet --> Properties of references and override
At this dialog you can define which values shall be possible for the $-parameters defined in your reference
Best Regards
Leopold Knipp
Senior Support Specialist
a $-parameter is always a string. There is no possibility to define a datatype for the $-parameter.
When inserting a reference into a panel you get the standard-dialog for the $-parameters, when you have not defined an own configuration-dialog.
How to create an own configuration-dialog for a reference is described at the following part of the online-help:
Graphics editor (GEDI) --> The property sheet --> Properties of references and override
At this dialog you can define which values shall be possible for the $-parameters defined in your reference
Best Regards
Leopold Knipp
Senior Support Specialist
- aorange
- Posts:147
- Joined: Thu Nov 04, 2010 10:07 am
Re: $-Parameters definition (without ScriptWizard)
The only way to do this that I can think of is to create your own $-parameter dialog/wizard, check out the chapter in the help file as Leopold suggested and use e.g. dpNames() to fetch all datapoint names in a given type, then use the returned dynString to populate either a drop-down menu or a tree widget, etc. I would take a bit of work but it is possible to achieve the functionality that you require.
- n_lev
- Posts:73
- Joined: Tue May 28, 2013 2:24 am
Re: $-Parameters definition (without ScriptWizard)
Thanks a lot, guys, I'll dig into it