Reconstruct

This page in 2003
Top  Previous  Next

Generates a new worksheet which seeks to make a calculation understandable by laying out its essential features simply.

Applies to

IOAKAddIn, IOAKAPI

SYNTAX

result = expression1.Reconstruct

expression2.Reconstruct(Range1, OptimizationMode1, PruningMode1, additionsOnly, sumExpansionLimit, maxDepth)

expression1   Required.  An expression that returns an IOAKAddIn object.

expression2   Required.  An expression that returns an IOAKAPI object.

result   An OAKResult enumeration indicating the success or otherwise of the action.

Range1           Required Range.  The cells containing the calculation to be reconstructed.

OptimizationMode1 Required OptimizationMode: One of OptimizationMode_Aggressive. OptimizationMode_Conservative, or OptimizationMode_None

PruningModel1   Required PruningMode. Specifies what, if any, pruning is performed on functions encountered during the analysis of precedent formulas.

additionsOnly        Required Boolean. Instructs OAK to perform precedent substitution only to the extent that the result is a formula that contains +, - and SUM.  Equivalent to the Confine to additions option in the dialog box presented when the user interface version of the Reconstruct command is activated.

sumExpansionLimit   Required Long. Instructs OAK to expand any SUM() function which acts on this number or fewer cells that is, convert from SUM(A1:A3) to A1+A2+A3.

maxDepth   Required Long. Indicates how many levels of precedent substitution are to be attempted.

Remarks

When applied to an IOAKAddIn object, the Reconstruct method performs the same action as the OAK Review | Formula | Reconstruct command, including presenting the same dialog boxes.

When applied to an IOAKAPI object, the Reconstruct method acts on the cells specified by Range1, delivering a reconstruction specified by the other parameters to the method.

Wrinkles

When applied to an IOAKAddIn object, the Reconstruct method does not follow the One-cell rule.  This is because it acts on a calculation, a notion defined as neighboring cells that form all or part of a single row and contain the same formula.  The method will display a dialog box seeking details of the action it is to perform, just as the equivalent OAK user-interface command does.

Though OAK will attempt the specified number of levels of precedent substitution, it may deliver fewer of them.