Jump to content

VW Preference Constants

Recommended Posts

After answering a question yesterday about the constants for the Interactive Settings in the VW Preferences I realized it would be nice if the entire VW Preference Dialog were annotated the same way. It's been a while since I posted anything, so here is a small year end gift.

The majority of the constants can be read with GetPref() and SetPref() as boolean values - anything with a checkbox or radio button is typically a boolean value.

The PopUp menus and the Sliders with integer values can be accessed with GetPrefInt() and SetPrefInt().

The Sliders with decimal values and the Text fields that take distance or time entries can be accessed with GetPrefReal() and SetPrefReal().

These functions are described in the VectorScript Function Reference that ships with the VW software (most of the time), or online at NNA's download page.

If any of the data in this post is incorrect, please contact me (PM) and I will correct and reload the file.

Happy New Year, everyone.


Link to comment
  • 2 months later...

Here are two more annotated preference dialogs; VW Document Preferences and Unified View Options. The latter was posted in an adjacent thread but is also posted here to keep the bundle close knit.

In the Document Preferences dialog, there are three items where I did not find a preference number, despite searching the entire list:

???Display Tab > Hide wall components when layer scale <= 1: _____

???Resolution Tab > PDF Export (Quartz Only): _____ DPI

???Resolution Tab > Printing: _____ DPI

Should anyone know how to read or write these values, please let me know.


Link to comment

Hi Pat,

???Pref 540 is the field to the right of the preference I am looking for. It's a PrefInt. I am looking for the boolean pref number that controls the checkbox. I don't believe there currently is a number for that, based on a script I wrote that compares all pref values before and after an event, in this case, the manual toggling of that check box. Nothing changes when that checkbox is set or cleared.

???The same is true of the other two DPI values under the Resolution Tab, BUT, if you do find something that escaped me, please let me know and I'll update the PDF's.

Thank you,


PS - Don't spend too much time on it. I already compared every Integer, Longint and Real preference value from 0 to 32767. Not even a nibble.

Link to comment

Thanks Pat,

???I've got it now. The Checkbox state is implied. When it's disabled the Layer Scale value is negative, although it doesn't show to be negative, just grayed. When it's enabled, the value is positive. Seems easy when you know the answer.

SetPrefInt(540, -GetPrefInt(540));

will toggle the checkbox and retain the Layer Scale value. I'll add a note to my PDF and repost it.


Link to comment
  • 1 year later...

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