2.2.4.7 DataObjectBase


Contents

Name

DataObjectBase

Remark

The DataObjectBase class provides methods and properties common to all data objects. The Origin C DataObjectBase class is an abstract base class used for polymorphic handling of DataObject and DataPlot related class types. Consequently, Origin C objects of type DataObjectBase can not be constructed. Derived classes such as DataObject, Column, MatrixObject, and DataPlot inherit DataObjectBase class methods and should be used instead.

Hierarchy

Examples

EX1

void DataObjectBase_ex1()
{
    Worksheet wks;
    wks.Create("origin");
 
    if(wks)
    {
        int nCol = wks.Columns("B").GetIndex();
        string strNewColName;
        if(nCol >=0) 
            wks.InsertCol(nCol+1, "Result", strNewColName);
    }
}

Header to Include

origin.h

Reference

Members

Name Brief Example
Retrieves categorical map from DataObject.
A DataObjectBase object is always associated with a dataset inside Origin. Since Dataset is a template class, we use the name as the common mean of connecting to a Dataset.
Get the index of object in layer, 0 offset.
It retrieves the data (display) range for the object.
It sets the data (display) range for the object.

Property

Name Brief Example
Property: The lower data range index for the object.
Property: The upper data range index for the object.
Property: For Column or DataPlot that has been set with SetEvenSampling, the X value of the 1st row. NANUM if not applicable.
Property: For Column or DataPlot that has been set with SetEvenSampling, the X increment between each row. NANUM if not applicable.