Detach
Detach an Origin C Curve object from internal Origin data sets.
BOOL Detach( )
Returns TRUE on successful exit and FALSE on error.
EX1
int Curve_Detach_ex1(string wksName1 = "Book1", string wksName2 = "Book2") { // Assumes Book1_A, Book1_B, Book2_A, and Book2_B exist and contain data Dataset dsA(wksName1,0), dsB(wksName1, 1); Curve crv(dsA.GetName(), dsB.GetName()); // Declare Curve object and attach to X and Y datasets crv.Sort(); crv.Detach(); // Detach Curve Object from X and Y data sets //dsA.Detach(); // Not really necessary to Detach before re-attach //dsB.Detach(); // Attaching to different dataset automatically detaches from previous dataset dsA.Attach(wksName2,0); dsB.Attach(wksName2,1); crv.Attach(dsA.GetName(), dsB.GetName()); // Re-Attach Curve object to different X and Y data sets crv.Sort(); return 0; }
Detach an Origin C Curve object from internal Origin data sets. The Curve object can only be attached to one pair of internal Origin data sets at a time but it may be sequentially detached and re-attached as many times as desired.
Curve::Attach, Curve::Curve
origin.h