2.2.4.8.36 DataPlot::SetLinkedDataset


Description

Set linked dataset.

Syntax

BOOL SetLinkedDataset( LPCSTR lpcszDatasetName, int nType = LDT_MODIFIER )

Parameters

lpcszDatasetName
[input] the linked dataset name
nType
[input] link type, obsolete

Return

TRUE if successful, otherwise FALSE

Examples

EX1

void DataPlot_SetLinkedDataset_ex1()
{
    Worksheet wks;
    wks.Create("origin");
    Dataset ds1(wks,0);
    Dataset ds2(wks,1);
    ds1.Data(1,20,1);
    ds2.Normal(20);
    GraphPage gp;
    gp.Create("origin");
    GraphLayer gl(gp.GetName(), 0);
    gl.AddPlot(wks); 
 
    DataPlot dp = gl.DataPlots(0); 
    string strName = ds1.GetName();
    BOOL bSuccess = dp.SetLinkedDataset(strName);
    printf("SetLinkedDataset: %s\n", strName);
    
    string strNameGet;
    bSuccess = dp.GetLinkedDatasetName(strNameGet);
    printf("GetLinkedDatasetName: %s\n", strNameGet);
}

Remark

See Also

DataPlot::GetLinkedDatasetName

Header to Included

origin.h