get_file_group_default_path

 

Description

This function is used to get the save path from the file named origin.ini in user folder or system folder. All groups can be seen in the list conctrol of Preference|Options|File Locations Group Column.

Syntax

string get_file_group_default_path( LPCSTR lpcszFileGroup, bool bSavePath = true )

Parameters

lpcszFileGroup
[Input] String pointer of file group name and it is case-insensitive.
Possible values for the file group name :
"ASCII"
"CSV"
"Dbase"
"DCFFiles"
...
bSavePath
[Input] bool value to show get save path or open path of Preference|Options|File Locations, true : save path, false: open path .
True value by default.

Return

Return the save path if the ini file and the file group name are all existing.

Or it will return a void string and report an error.

Examples

EX1

//Assume that the save path of ascii file group is "D:\Program Files\OriginLab\OriginPro8\Originlab\" setting in Preference|Options|File Locations
void test_get_file_group_default_path()
{
    string strSavePath;
    strSavePath = get_file_group_default_path("ascii");//can also be "ASCII" 
    //--> strSavePath = "D:\Program Files\OriginLab\OriginPro8\Originlab\"
}

Remark

See Also

header to Include

origin.h

Reference