ZOSAPI.Common.IVectorData Interface Reference
Last update: 17.07.2025Methods and properties for retrieving and/or setting a 1D array of double precision data. More...
Public Member Functions | |
| void | ReadData (int Size, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)][In, Out]double[] Data) |
| Populates the specified array with the data vector. Note that this is the same as using the Data property, however it may be easier to use for COM-based clients. | |
| void | WriteData (int Size, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)][In]double[] Data) |
Stores the specified array in the vector. Note that this is the same as using the Data property, however it may be easier to use for COM-based clients. This method will not do anything if IsReadOnly is true. | |
| double | GetValueAt (int position) |
| Gets the value at the specified index. Note that this may be much slower than retrieving all of the data at once via the Data property or ReadData method. | |
| void | SetValueAt (int position, double Value) |
| Sets the value at the specified position. Note that this may be much slower than setting all of the data at once via the Data property or WriteData method. | |
Properties | |
| bool | IsReadOnly [get] |
| Gets a value indicating whether the data in this vector can be modified. | |
| int | Length [get] |
| Gets the length of this data vector. | |
| double[] | Data [get, set] |
| Gets or sets the data for this vector. | |
Detailed Description
Methods and properties for retrieving and/or setting a 1D array of double precision data.
Usage (see Example 23 for a full sample)
C#
C++
Matlab
Python
Member Function Documentation
◆ GetValueAt()
| double ZOSAPI.Common.IVectorData.GetValueAt | ( | int | position | ) |
Gets the value at the specified index. Note that this may be much slower than retrieving all of the data at once via the Data property or ReadData method.
- Parameters
-
position The position (0 to Length-1).
- Returns
◆ ReadData()
| void ZOSAPI.Common.IVectorData.ReadData | ( | int | Size, |
| [In, Out] double[] | Data | ||
| ) |
Populates the specified array with the data vector. Note that this is the same as using the Data property, however it may be easier to use for COM-based clients.
- Parameters
-
Size The size of the input array. Data The array to fill.
◆ SetValueAt()
| void ZOSAPI.Common.IVectorData.SetValueAt | ( | int | position, |
| double | Value | ||
| ) |
Sets the value at the specified position. Note that this may be much slower than setting all of the data at once via the Data property or WriteData method.
- Parameters
-
position The position (0 to Length-1). Value The new value.
◆ WriteData()
| void ZOSAPI.Common.IVectorData.WriteData | ( | int | Size, |
| [In] double[] | Data | ||
| ) |
Stores the specified array in the vector. Note that this is the same as using the Data property, however it may be easier to use for COM-based clients. This method will not do anything if IsReadOnly is true.
- Parameters
-
Size The size of the input array. Data The data to store.
Property Documentation
◆ Data
|
getset |
Gets or sets the data for this vector.
Usage (see Example 04 for a full sample)
C#
C++
Matlab
Python
The data.
◆ IsReadOnly
|
get |
Gets a value indicating whether the data in this vector can be modified.
true if this instance is read only; otherwise, false.
◆ Length
|
get |
Gets the length of this data vector.
The length.