duplicate the active curve in the active graph layer so that analysis routine like derivatives and smoothing can be performed on the copied curve
curvebase & curve_duplicate_active( LPCSTR lpcszNewColName = NULL, bool bReuseIfInWks = false )
NULL if no active graph layer with active curve found, or if the operation failed
EX1
//This example copy the active curve with the data of column B from the Graph. void curve_duplicate_active_ex1() { WorksheetPage wksPage = Project.WorksheetPages(0); Worksheet wks = wksPage.Layers(0); if(wks) { GraphPage gp; gp.Create(); GraphLayer gl = gp.Layers(0); Curve crv(wks, 1); if(crv && gl) { add_curve_to_graph_layer(crv, gl); // add the curve to the graphlayer gl.Rescale(); set_active_layer(gl); // set the graphlayer to active gp.Refresh(); // need do refresh after set acitve // get curve from active graph layer to copy curvebase& crvCopy = curve_duplicate_active(); if(crvCopy != NULL) { out_str("Copy successfully."); } } } }
origin.h