【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.4.6.9 DataObject::IsFormulaAutoUpdate
Contents
Description
Returns the autoupdate mode for the column formula (if any).
Syntax
int IsFormulaAutoUpdate( int * pBegin = NULL, int * pEnd = NULL )
Parameters
- pBegin
- [output, optional]it receives the lower row bound of the formula.
- pEnd
- [output, optional]it receives the upper row bound of the formula.
Return
One of the values:
AU_NONE = not recalculable (no operation object present).
AU_AUTO = automatic recalculation once any input value changes.
AU_ON_COMMAND = manual recalculation
Examples
EX1
void DataObject_IsFormulaAutoUpdate_Ex1() { Worksheet wks; wks.Create("origin", CREATE_VISIBLE); Dataset dsA(wks, 0); dsA.Data(1, 100, 1); Column col(wks, 1); col.SetFormula("sin(4*col(A)*pi/180)", AU_AUTO, 5, 10); // set column formula with auto update mode col.ExecuteFormula();// this step is needed to initiate Recaulation int nBegin, nEnd; bool bAU = col.IsFormulaAutoUpdate(&nBegin, &nEnd); if(AU_AUTO == bAU) out_str("set column formula with auto update mode"); }
EX2
void DataObject_IsFormulaAutoUpdate_Ex2() { MatrixPage mp; mp.Create("origin"); MatrixLayer ml = Project.ActiveLayer(); if ( !ml ) { printf("Can not access active matrixsheet"); return; } MatrixObject mo = ml.MatrixObjects(0); //get first matrixobject mo.SetFormula("sin(i) + cos(j)"); mo.ExecuteFormula(); int nBegin, nEnd; if ( 0 == mo.IsFormulaAutoUpdate(&nBegin, &nEnd) ) printf("Formula is auto update mode"); }
Remark
See Also
Header to Include
origin.h