| 2.2.4.6.9 DataObject::IsFormulaAutoUpdateIsFormulaAutoUpdate
 DescriptionReturns the autoupdate mode for the column formula (if any).
 Syntaxint 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.
 ReturnOne 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
 ExamplesEX1
 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");
}RemarkSee AlsoDataObject::SetFormula
 Header to Includeorigin.h
 |