2.2.4.38.12 Project::DatasetNames

Description

Collection of names of all Origin datasets.


Get the name of Dataset having the 0-offset index.

Syntax

Collection<string> DatasetNames


string DatasetNames(int index)

Parameters

index
[input] An integer smaller than the number of datasets in the open project. The datasets are enumerated by the order in which they are created in the open project file.

Return

Returns the name of the dataset having the 0-offset index.


Examples

EX1

// This example assumes several existing datasets - either loose datasets (those not displayed
// in a worksheet column or matrix window) or displayed datasets
int Project_DatasetNames_ex1()
{
    // Loop over all datasets in the project and display their names
    int ii = 1;
    foreach(string strName in Project.DatasetNames)
    {
        printf("Dataset(%d) Name: %s\n",ii++, strName);
    }
    return 0;
}

EX2

// This example assumes at least one existing dataset in Origin
int Project_DatasetNames_ex2(int index = 0)
{
	string strName = Project.DatasetNames(index);
	printf("Dataset(%d) Name: %s\n",index, strName);
	return 0;
}

Remark

Collection of names of all Origin datasets in the current project - either loose datasets (those not displayed in a worksheet column or matrix window) or displayed datasets.


Header to Include

origin.h

See Also

Project::Pages, Project::WorksheetPages, Project::Notes, Project::MatrixPages, Project::GraphPages, Project::LayoutPages, Project::LooseDatasetNames

Reference