add_new_layer

 

Contents

Description

Add new layer on the page, if page not exist, create new page.

Syntax

string add_new_layer( Folder & fld, string & strPageName, int nLayerType = EXIST_WKS )

Parameters

fld
[input] The folder will create the layer
strPageName
[input] The parent page name of the new layer
nLayerType
[input] Page and layer type

Return

return layer name if success.

Examples

EX1

void add_new_layer_ex1()
{
        Folder newFolder = add_new_folder();
        string strPageName = "newLayerTest";
        string strNewLayer = add_new_layer(newFolder,strPageName);//page is not exist
    printf("%s",strNewLayer);
    strNewLayer = add_new_layer(newFolder,strPageName);//page is exist
    printf("%s",strNewLayer);
}

Remark

See Also

header to Include

origin.h

Reference