XDataIIPtr
|
Scope
|
Pego, Pesgo, Pepso, Pe3do
|
|
Type
|
Pointer buffer/IntPtr of type Double (8byte)
|
|
Default
|
NULL
|
|
JS / .NET
|
set with PeData.Xii.UseDataAtLocation
|
|
OCX / VCL
|
set with PEvset
|
|
DLL
|
PEP_faXDATAIIPTR
|
Purpose
This property is used to communicate to ProEssentials that the XDataII property should not allocate it's own memory, but instead use the local memory address that has already been allocated to the appropriate size. If JaggedData=False, the format of the data is defined by the SubsetByPoint property.
Examples 146 and 123 show an implementation of this feature.
The advantages of using this feature are reducing the memory needs for your project:
1) multiple charts may use the same memory, for example, a 3D Surface and 2D Contour.
2) your project's logic may work with the same copy of memory as the chart.
Comments
.Net develooers note that methods such as PeData.Xii.UseDataAtLocation are documented in Chapter 3: .Net Property Arrays
.Net Non-JaggedData: PeData.Xii.UseDataAtLocation
.Net JaggedData: PeData.Xii.UseJaggedDataAtLocation
DLL develppes must set this property with PEvset (Non-Jagged) or PEvsetcellEx (Jagged-Data).
Related properties: XDataPtr, YDataPtr, YDataIIPtr, ZDataPtr, ZDataIIPtr, PointColorsPtr
C#.NET Example
|
// Provide local pointers, data is not copied to chart
// For Non-Jagged Data
Pesgo1.PeData.Xii.UseDataAtLocation(MainWindow.tmpSongXData, MainWindow.SongSize); // providing explicit size of subset
//For JaggedData
Pesgo1.PeData.Xii.UseJaggedDataAtLocation(MainWindow.wavedatax, 0); // defaults size of subset as size of array
|
C / C++ Example
|
MyXData146 = new double[2000000];
MyYData146 = new double[8000000];
// Provide local pointers to App data, data is not copied to chart
// XData is smaller as DuplicateDataX is set so 4 subsets share 1 subset of data.
PEvset(m_hPE, PEP_faXDATAIIPTR, MyXData146, 2000000);
PEvset(m_hPE, PEP_faYDATAIIPTR, MyYData146, 8000000);
For Jagged-Data use PEvsetcellEx
PEvsetcellExW(m_hPE, PEP_faXDATAIIPTR, 0, 10000, &m_pGlobalXData[0]);
PEvsetcellExW(m_hPE, PEP_faYDATAIIPTR, 0, 10000, &m_pGlobalYData[i]);
|
|