Visit Gigasoft's Web Site
 ProEssentials v11 Help

ZDataIIPtr

Scope

PesgoPe3do

Type

Pointer buffer/IntPtr of type Single (4byte)

Default

NULL

JS / .NET

set with PeData.Zii.UseDataAtLocation 

OCX / VCL

set with PEvset or PEvsetcellEx

DLL

PEP_faZDATAIIPTR

 

Purpose

This property is used to communicate to ProEssentials that the double precision ZDataII 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 for XDataPtr and YDataPtr.

 

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 developers note that methods such as PeData.Zii.UseDataAtLocation are documented in Chapter 3: .Net Property Arrays  

 

.Net Non-JaggedData: PeData.Zii.UseDataAtLocation
.Net JaggedData: PeData.Zii.UseJaggedDataAtLocation

 

DLL develppes must set this property with PEvset (Non-Jagged) or PEvsetcellEx (Jagged-Data).

 

Related properties:  YDataPtr, XDataPtr 

 

C#.NET Example

// Provide local pointers, data is not copied to chart

// For Non-Jagged Data

Pesgo1.PeData.X.UseDataAtLocation(MainWindow.tmpSongXData, MainWindow.SongSize); // providing explicit size of subset 
 

//For JaggedData
Pesgo1.PeData.X.UseJaggedDataAtLocation(MainWindow.wavedatax, 0); // defaults size of subset as size of array 

C / C++ Example

MyXData146 = new float[2000000];
MyYData146 = new float[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_faXDATAPTR, MyXData146, 2000000);
PEvset(m_hPE, PEP_faYDATAPTR, MyYData146, 8000000);


For Jagged-Data use PEvsetcellEx 
PEvsetcellExW(m_hPE, PEP_faXDATAPTR, 0, 10000, &m_pGlobalXData[0]);

PEvsetcellExW(m_hPE, PEP_faYDATAPTR, 0, 10000, &m_pGlobalYData[i]);