FindOutgoingOperations
Find UIDs where this object is an input
int FindOutgoingOperations( vector<uint> & vUIDs )
the size of the vector, or -1 if error.
EX1
// Have a worksheet active on which some fits or statistics were performed // The example finds sheet with results that depend on the active worksheet #include <Origin.h> #include <operation.h> static bool find_result_sheets_in_same_book(Worksheet& wks, vector<string>& vsNames) { WorksheetPage wp = wks.GetPage(); if(!wp) return false; vector<uint> unOpIDs; if(wks.FindOutgoingOperations(unOpIDs) <= 0) return false; vsNames.SetSize(0); for(int ii = 0; ii < unOpIDs.GetSize(); ii++) { Operation &op = (Operation &)Project.GetOperationObject(unOpIDs[ii]); if(op) { DataRange dr; Worksheet wResult; if(op_get_output(op, dr, wResult) && (wResult.GetSystemParam(0) & WP_SHEET_HIERARCHY)) // only consider hierarical sheet { WorksheetPage wpr = wResult.GetPage(); if(wpr.GetName() == wp.GetName()) vsNames.Add(wResult.GetName()); } } } return true; } void OriginObject_FindOutgoingOperations_Ex1() { Worksheet wks = Project.ActiveLayer(); vector<string> vsResultSheets; if(find_result_sheets_in_same_book(wks, vsResultSheets)) { for(int ii = 0; ii < vsResultSheets.GetSize(); ii++) out_str(vsResultSheets[ii]); } }
Retrieve the UIDs of all the operations that have this object or any parts thereof (like the input DataRange intersects with a column of 'this' OriginObj which could be a column, a sheet, or a book) as input.
OriginObject::FindIncomingOperations Project::GetOperationObject
origin.h