Project::Notes

Description

Collection of all the note pages in the project.

 

Get a Note window by index.

 

Get a Note object by name.

Syntax

Collection<Note> Notes

Note Notes(int index = -1)

Note Notes(LPCSTR lpcszName)

Parameters

index
[input] The 0-offset index of the Note object in the open project, or default -1 for the active page.

lpcszName
[input] Name of the note page in Origin.

Return

Returns a valid Note object for the index'th Note object in the project or an invalid Note object.


Returns a valid Note object having the short name lpcszName or an invalid Note object.

Examples

EX1

// This example assumes several existing Note windows
int Project_Notes_ex1()
{
    // Loop over all the note pages in the project and display their names
    foreach(Note nte in Project.Notes)
    {
        out_str(nte.GetName());
    }
    return 0;
}

EX2

// This example assumes at least one existing note window in Origin
int Project_Notes_ex2()
{
        Note nte = Project.Notes(0); // Get the first note page
        if( nte.IsValid() )
                out_str(nte.GetName()); // Display the name of the first created note page
        return 0;
}

EX3

// This example assumes at least one existing note window in Origin
int Project_Notes_ex3(string strName = "Notes")
{
        Note nte = Project.Notes(strName); // Get the Note object for the note window in Origin having the short name strName
        if( nte.IsValid() ) // If valid...
                out_str(nte.GetName()); // Use the Note object to display the name of the window
        return 0;
}

Remark

header to Include

origin.h

See Also

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

Reference