Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 1.19 KB

File metadata and controls

65 lines (53 loc) · 1.19 KB

RecalculateWS

Description

Recalculates all formulas for the referenced worksheet.

PROCEDURE RecalculateWS(worksheet : HANDLE);
def vs.RecalculateWS(worksheet):
    return None

Parameters

Name Type Description
worksheet HANDLE Handle to worksheet.

Remarks

This does not update the screen, so you should also do:

ResetObject(worksheet);
WSImage := GetWSImage(worksheet);
If WSImage <> NIL then ResetObject(WSImage);

Examples

VectorScript

PROCEDURE WSrecalc;
{ (c) Petri Sakkinen 2008, except the key part which is (c) Victor via VSFR }

VAR 
  i, n : INTEGER;
  objName : STRING;
  foundObject : HANDLE;
  OK : BOOLEAN; 

FUNCTION DoIt (h : HANDLE) : BOOLEAN;
BEGIN
  RECALCULATEWS(h);
  RESETOBJECT(h);              { these two lines   }
  RESETOBJECT(GETWSIMAGE(h));  { are the key part! }
END;

BEGIN
  n := NAMENUM; 
  FOR i := 1 TO n DO BEGIN
    foundObject := GETOBJECT(NAMELIST(i));
    IF GETTYPE(foundObject) = 18 THEN ok := DoIt(foundObject);
  END; 
END;
RUN(WSrecalc);

Python

Version

Availability: from VectorWorks9.0

Category