2.2.4.7 DataObjectBase


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
GetCategoricalMap Retrieves categorical map from DataObject. Examples
GetDatasetName 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. Examples
GetIndex Get the index of object in layer, 0 offset. Examples
GetRange It retrieves the data (display) range for the object. Examples
SetRange It sets the data (display) range for the object. Examples

Property

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