Layer::InsertWks

 

Description

Add Worksheet as a GraphObject to Graph.

Syntax

GraphObject InsertWks( Worksheet & wks, LPCSTR lpcszName = NULL, DWORD dwCntrl = 0 )

Parameters

wks
[input] the Worksheet to insert
lpcszName
[input] default: NULL, specify the GraphObject name
dwCntrl
[input] default: 0, it's userless for now

Return

GraphObject inserted from the Worksheet

Examples

EX1

void Layer_InsertWks_ex1()
{
    // Create a layer object and attach it to currently active layer
    Layer ly = Project.ActiveLayer();
    if( !ly.IsValid() )
        return;
    
    Worksheet wks;
    wks.Create("Origin");

    GraphObject go = ly.InsertWks(wks, "name", 0);
    if( go.IsValid() )
    {
        out_str( "GraphObject is valid" );
    }
    else
    {
        out_str( "GraphObject is not valid" );
    }
}

Remark

See Also

Layer::InsertGraph

header to Included

origin.h