Jump to content

Setting (not toggling) preferences using scripts


Recommended Posts

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!

Link to comment

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.

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.

Guest
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...