Jump to content
Sign in to follow this  
Mat Caird

quick toggle for "zoom lineweight"?

Recommended Posts

This script will do it. Make it a plugin and add it to your work space and assign it a keystroke.

PROCEDURE BwOff;VAR result:BOOLEAN; BEGIN result := GetPref(10); IF result = TRUE THEN SetPref(10,FALSE); IF result = FALSE THEN SetPref(10,TRUE);


Share this post

Link to post

You can do it with one line of code:

SetPref(9, not GetPref(9));

This sets the preference to the opposite of its current state. I place it in a script palette with the name ZLT (for Zero Line Thickness), but you can do as IONW suggests, <<Make it a plugin and add it to your work space and assign it a keystroke. >>

This can be done with any of the boolean preferences. You just need the number of the pref which you cn get from the Appendix of the VS Function Reference.


PS - Pref 10 that IONW mentions is for toggling B&W display.

[ 08-30-2002: Message edited by: MullinRJ ]

Share this post

Link to post

Thank you Raymond, my apologies to Mat Caird, and any others that were confused, I simply went to the wrong script. I have them set up for my most often accessed prefs so there are 6 or more scripts for me to choose from.

Also thanks for the concise method of toggling that pref. I enjoy condensed programming. I just wish there was more information on exactly how the script language works and interacts. I am reasonably proficient in C and C++, but never worked much in Pascal. I am going to go shorten all my toggles.

My only other recomendation is that if you add it to your workspace instead of the command palette, then it is available in all documents, past present and future without having to import the script.

Share this post

Link to post

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.

Sign in to follow this  


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...