set_curve

 

Contents

Description

add to TreeNode the X and Y dataset names of the given curve

Syntax

bool set_curve( const curvebase & cuv, TreeNode & trNode )

Parameters

cuv
[input] Curve to get names from
trNode
[output] tree node to add the needed info

Return

TRUE if success

Examples

EX1

//This example show the info. of the curve.
//For this sample to work, a dataset should exist.
#include <tree_utils.h>
void set_curve_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if(wks)
    {
        Curve crvPlotted( wks, 1 );
        Tree trNode;
        if(crvPlotted)
        {
            bool bOK = set_curve(crvPlotted, trNode);
            if(bOK)
            {
                out_tree(trNode);
            }
        }
    }
}

Remark

See Also

set_active_layer

header to Include

origin.h

Reference