VS:GetWSAutoRecalcState

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Gets the AutoRecalc state for the specified worksheet.


When the AutoRecalc flag is on for a worksheet, it automatically recalculates every time a cell is edited.

In order to improve speed when editing mutiple cells one after the other or in a loop, it is highly recommended to turn this flag off prior to the edits and restore it, then recalculate the worksheet when all the edits are completed.

FUNCTION GetWSAutoRecalcState(
worksheet  :HANDLE) : BOOLEAN;
def vs.GetWSAutoRecalcState(worksheet):
    return BOOLEAN

Parameters

worksheet HANDLE Handle to worksheet.

Example

VectorScript

{Save the current AutoRecalc state}
state := GetWSAutoRecalcState(h);

{Turn off worksheet Auto Recalculation}
SetWSAutoRecalcState(h,FALSE);

{Execute worksheet edit operations ....}

{Restore AutoRecalc state}
SetWSAutoRecalcState(h, state);

{Recalculate the worksheet}
RecalculateWS(h);

Python

#{Save the current AutoRecalc state}
state = vs.GetWSAutoRecalcState(h)

#{Turn off worksheet Auto Recalculation}
vs.SetWSAutoRecalcState(h,False)

#{Execute worksheet edit operations ....}

#{Restore AutoRecalc state}
vs.SetWSAutoRecalcState(h, state)

#{Recalculate the worksheet}
vs.RecalculateWS(h)

Version

Availability: from Vectorworks 14.0

See Also

VS Functions:

VS:SetWSAutoRecalcState | VS:RecalculateWS

VS Functions:

[[VS:SetWSAutoRecalcState]]

| [[VS:RecalculateWS]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox