Markus Barrera-Kolb Posted June 15, 2008 Share Posted June 15, 2008 I've found highly useful information on the forum on how to toggle preference settings using Vscripts, for example using something like: SetPref(33, NOT GetPref(33)); However, I'd like to make two scripts that, in one operation each, set the screen background, line thickness zoom, and black & white only preferences to predetermined values, regardless of what they were previously. Basically I'd like to switch betweeen my normal mode of working (no line thickness, black background, with colors visible), to a 'preview-like' mode, where I can see line thicknesses, the background is white, and all of the printed stuff is black. Any help? Thanks! Quote Link to comment
IanH Posted June 15, 2008 Share Posted June 15, 2008 Instead of the NOT GetPref(33) simply replace with 0 to turn feature off and 1 to turn feature on. PROCEDURE setPrefs; BEGIN SetPref( x, 1); SetPref( y, 1); SetPref( z, 1); END; RUN( setPrefs ); You then need to replace x, y, z with the setting numbers that you want to set - its in the VW documentation - somewhere - appendix F of the VectorScript 13.0 Function Reference help document. set the screen background, line thickness zoom, and black & white Setpref( 10, 1 ) - B&W Only SetPref( 9, 1 ) - zoom line thickness SetPref( 16, 1 ) - black screen background To set the settings back, replace the 1 with a 0 and change the procedure name. Quote Link to comment
Markus Barrera-Kolb Posted June 16, 2008 Author Share Posted June 16, 2008 Thanks Ian, that's perfect! Quote Link to comment
Markus Barrera-Kolb Posted June 16, 2008 Author Share Posted June 16, 2008 Just to follow up: Turns out that the compiler is expecting the boolean operator to be entered as "True" or "False" -- when I tried "1" or "0" I got an error message... Quote Link to comment
Recommended Posts
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.