Creates a flexpro.Data object that represents a FlexPro data structure "List" with named list elements.
Syntax
flexpro.named_list(Name1, Data1, Name2, Data2,...)
The syntax of the flexpro.named_list function consists of the following elements:
Part |
Description |
---|---|
Name1, Name2 ... |
A string with the list element name for each list element. The names do not have to be unique. |
Data1, Data2 ... |
For each list element, a flexpro.Data() object or any Python data that can be converted into FlexPro data. |
Result
The newly created flexpro.Data object of type "List" with named list elements.
Available In
FlexPro Professional, Developer Suite
Examples
this.data = flexpro.named_list("Signal1", s1, "Signal2", s2) |
Creates a FlexPro list with two elements with the values of the variables s1 and s2. |
this.data = flexpro.named_list("Signal1", s1, "Signal2", s2) + flexpro.named_list("Signal3", s3, "Signal4", s4) |
FlexPro lists can be concatenated like Python lists. |