Hi Micheal,
You can define the dataset as a integer dataset using Dataset<int> ds; Alternatively, if the data type for the worksheet column is not known, you can use the GetDataObject() method to get it as a vectorbase and then make manipulation on the data.
The following examples give the details:
void Integer_DataSet(int nCol = 1)
{
Worksheet wks = Project.ActiveLayer();
Dataset<int> dsA;
dsA.Attach(wks,nCol);
dsA.SetSize(20);
dsA[2]=9;
}
void Column_Type_Unknown(int nCol = 1, double ff = 2)
{
Worksheet wks = Project.ActiveLayer();
Column cc(wks, nCol);
if(cc)
{
vectorbase& vb = cc.GetDataObject();
vector vv;
vv = vb;
vv *= ff;
vb = vv;
}
}
Zachary
OriginLab Technical Services.