XYZRange
The XYZRange class provides methods to get and set XYZ dataset for matrix and worksheet window. Same as DataRange class, itself does not hold data, just keep the data range with page name, sheet name and row/column indices. One XYZRange object allow containing multiple sub XYZ data ranges.
The XYZRange class is derived from the DataRange class from which it inherits methods and properties.
EX1
// Output the description of the XYZ Range in the active worksheet. void XYZRange_XYZRange_ex1() { //assume there exists active worksheet with at least three columns. Worksheet wks = Project.ActiveLayer(); if ( wks ) { XYZRange dr; dr.Add(wks, 0, "X"); dr.Add(wks, 1, "Y"); dr.Add(wks, 2, "Z"); string strDescription = dr.GetDescription(); out_str(strDescription); } }
EX2
// Output the description of the XYZ Range in the active matrixlayer. void XYZRange_XYZRange_ex2() { // Construct XYZ range from matrix window. // To run this example, need an active matrix window. MatrixLayer ml = Project.ActiveLayer(); if ( ml ) { XYZRange dr; dr.Add(ml, 0, "Range1"); string strDescription = dr.GetDescription(); out_str(strDescription); } }
origin.h