XYZRange

 

Name

XYZRange

Remark

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.

Hierarchy

Examples

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);
    }
}

header to Include

origin.h

Reference

Members

Name Brief Example
GetData Get xyz data as vectors Examples
GetXColumn To get X column of XYZRange Examples
GetYColumn To get Y column of XYZRange Examples
GetZColumn To get Z column of XYZRange Examples
SetData Set xyz data of the datarange Examples
XYZRange Constructors of the XYZRange class Examples