Jump to content

Recalculate Invisible worksheets in VectorScript

Recommended Posts

Hello Everyone,

Because DoMenuTextByName does not work on recalculate your invisible worksheets (it does not work at all with WSrecalculate), I found finally a workaround for this problem.

You will find the code below this message. I am sure you can adapt it easily to your own situation.

But I have to be honest, it was Fuge who brought me on this idea. Without his help I would never have found it.

However Nemetschek should be very serious fixing this problem in future versions of VectorWorks (I am now using 9.0.1) or even better, tell us how we can use this function to work even with international language versions of VectorWorks. I am sure many users are puzzled with this.

Have a nice day.

With friendly greetings,


procedure ReCalc; { Recalculate every worksheet in drawing } const intTotWorksheets=18; { Total (exact) worksheets in document }

procedure Calc; { This procedure recalculate every worksheet in your drawing. } { No worksheet has to be visible or open to get this work. } { The only important matter is that you specify all your worksheets } { in array strWS. Also make sure that intTotWorksheets contain the correct total worksheets. } { Thanks Dave (Fuge), your solution brought me on this idea. } var hndWS:handle; { Handle to worksheet to be calculated } strWS:ARRAY[1..intTotWorksheets] OF STRING; intIndex:integer; begin { Specifying worksheets in array } { New worksheets can be added at any position in this list } strWS[1] := 'A1. Afwerking'; strWS[2] := 'C1. Chappe en Vloer'; strWS[3] := 'D1. Binnendeuren'; strWS[4] := 'F1. Betonplaat'; strWS[5] := 'F2. Kruipkelder'; strWS[6] := 'F3. Kelder'; strWS[7] := 'G1. Gyproc'; strWS[8] := 'H1. Houten structuur'; strWS[9] := 'L1. Sanitair'; strWS[10] := 'M1. Metselwerken'; strWS[11] := 'P1. Pannen en goten'; strWS[12] := 'T1. Trappen'; strWS[13] := 'Y0. Basisprijzen'; strWS[14] := 'Y1. Forfaits'; strWS[15] := 'Y2. Kermit'; strWS[16] := 'Y3. Co?fficienten'; strWS[17] := 'Y4. Informatie'; strWS[18] := 'Y5. Fozzie'; { Recalculate every specified worksheet } For intIndex := 1 To intTotWorksheets do begin hndWS := GetObject(strWS[intIndex]); RecalculateWS(hndWS); end; end; { End of procedure Calc }

begin { Start Main Program } Calc; end; { End of script ReCalc }run(ReCalc);

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...