Manipulating Model Components in Flattened Format
- Updated2026-05-07
- 2 minute(s) read
Manipulating Model Components in Flattened Format
Format data as flattened 1D arrays in column-major order for inports, outports, signals, and vector parameters.
When you use the LabVIEW Model Interface Toolkit VIs to transfer data to model components, such as inports and parameters, in several cases you must format the data as flattened 1D arrays of values in column-major order.
Format of Inport, Outport, and Signal Values
You must format the data as flattened arrays when you perform the following tasks with the LabVIEW Model Interface Toolkit VIs:
In the following table each row represents a separate component of the same type, such as an inport, outport, or signal:
| Index in model | Value |
|---|---|
| 0 | 1 |
| 1 | [-0.777778, 0.5;-0.666667, 0] |
| 2 | 3 |
The Model Interface API represents these components with the following flattened 1D array in column-major order: [1, -0.777778, -0.666667, 0.5, 0, 3].
Format of Vector Parameters
To set or get the value of a particular element within a 2D vector parameter, you must identify the offset of that specific element within the flattened 1D array that represents the vector. Consider the following 2 × 2 vector parameter:
[-0.777778, 0.5;
-0.666667, 0]
The following table lists the offset values you use to identify each element in the parameter:
| Value | Column number | Row number | Offset within parameter |
|---|---|---|---|
| -0.777778 | 0 | 0 | 0 |
| 0.5 | 1 | 0 | 2 |
| -0.666667 | 0 | 1 | 1 |
| 0 | 1 | 1 | 3 |
Related Information
- Probing Signal Values
Probe signal values in a model using the Model Interface API, including signal buffering, formatting, and accessing values during execution.
- Initializing Parameter Values
Set and initialize parameter values in models using the Model Interface API or modeling environment software.
- Updating Parameters While the Model Runs
Use the Model Interface API to update model parameters programmatically during runtime.