11-27-2018 10:11 AM
I have a custom step type with a VI that has a cluster as input. I would like to display the value of a particular element of the cluster in the description of the step. I know how to get the value of other data-types with the expression
Step.TS.SData.ViCall.Parms["Parameter Name"].ArgVal
Since "Parameter Name" will be a cluster in my case, I can't find how to retrieve the value of a element.
Solved! Go to Solution.
11-28-2018 07:43 AM - edited 11-28-2018 07:43 AM
Hey,
You can reference the elements in the cluster using the ArrayClusterEls[] property. Your line will look something like this:
Step.TS.SData.ViCall.Parms["ClusterName"].ArrayClusterEls[ElementIndex].ArgVal
For example, my code module has a cluster argument called Cluster with a numeric and boolean control.
The below returns the numeric value (index 0):
Step.TS.SData.ViCall.Parms["Cluster"].ArrayClusterEls[0].ArgVal
The below returns the boolean value (index 1):
Step.TS.SData.ViCall.Parms["Cluster"].ArrayClusterEls[1].ArgVal
Hope this helps.
Nico
11-29-2018 08:59 AM
Thanks Nico,
When I insert the custom step, values are displayed in the description for
1. Enum input
2. Numeric/Boolean/String inside a cluster
But the value of an Enum inside a cluster is not visible right away. When I change the Enum value, it appears in the description. Do you maybe know why?
11-30-2018 08:39 AM