XYZRange::SetData
SetData
Description
Update XYZRange data with new data in vectors.
Syntax
BOOL SetData( vector * pvZ, vector * pvY, vector * pvX, int nIndex = 0, DWORD dwDRSOpts = DRS_SET_COL_DESIGNATIONS )
Parameters
- pvZ
- [input]the Z independent data
- pvY
- [input]the Y independent data
- pvX
- [input]the X independent data
- nIndex
- [input]the data index
- dwDRSOpts
- [input]the rules for Setting data from DRS_enumeration.
Return
TRUE if success.
Examples
//Update XYZRange data with new data in vectors.
void XYZRange_SetData_Ex1()
{
//assume there exists an active worksheet and has least three columns before run this code.
Worksheet wks = Project.ActiveLayer();
if ( !wks )
{
printf("Can not find any active worksheet!");
return;
}
DataRange dr;
dr.Add("X", wks, 0, 0, -1, 0);
dr.Add("Y", wks, 0, 1, -1, 1);
dr.Add("Z", wks, 0, 2, -1, 2);
vector vZ, vY, vX;
vZ.Data(1.0, 100.5, 0.5);
vY.Uniform(200, 2);
vX.Data(1, 200, 1);
XYZRange xyz(dr);
xyz.SetData(&vZ, &vY, &vX);
return;
}
Remark
See Also
XYZRange::GetData, DataRange::GetData, DataRange::SetData
header to Include
origin.h
|