Jump to content
Sign in to follow this  
Vincent C

Toggle Snap on/off

Recommended Posts

Anyone know if there is a keystroke/short cut/3rd party toggle etc. for switching all snaps on and off?

Share this post


Link to post

The shortest cut is to put a VS somewhere in your workspace, then assign a keystroke to it. I believe it's as simple as inserting the SetConstrain one-liner.

Share this post


Link to post

I don't know of a built in command. As Ken said above, a simple script made into a command in the Vectorscript Plugin Editor can be assigned a keyboard shortcut.

The actual script you need is:

SetConstrain('');

Those are two single quotes inside the parentheses.

Or you can go back to the olden days of MiniCAD. If you make the snaps palette two columns wide by 4 rows high, the left hand column will be ASDF and the right hand column will be QWER.

Unless this is something you really do all the time it may be easier just to learn those "geographically" based shortcuts.

Share this post


Link to post

Excellent guys...it works! my first VS :), can we take it a step further, to make it a true toggle, how do I make it switch the constraints on again?

Share this post


Link to post

Much more difficult problem. You would need to save all of the snap setting and then restore them afterward. I just checked the reference and I don't see a way to get all of the snap options. You can get the status of Snap to Grid and Snap to Object, but I am not finding the others.

I don't think you can do it with the current implementation of VS.

Share this post


Link to post
Excellent guys...it works! my first VS :), can we take it a step further, to make it a true toggle, how do I make it switch the constraints on again?

I recall this option from a recent experience setting up some

simple scripts via the Tools/Custom Tool Attribute menu command.

Select your snap options, go to Tools/Custom Tool Attribute...

and select only the "smart cursor setting" option, click OK

and the script will be created. BTW, I tested the snap options

scripts and it works on my VW 2009 SP5 version.

You can do this step for any snap configuration you want;

thereafter you can copy the script (via the resource browser)

, create a menu command and assign it a keyboard shortcut

in the workspace editor.

Share this post


Link to post

How about using two single-line scripts -- one to turn 'em all on, another to turn 'em all off.

SetConstrain('qwerasdf');

SetConstrain('');

Share this post


Link to post

I agree. For me, I only use this one, as part of a larger script:

SetConstrain('qwd');

Share this post


Link to post

Hello All,

This is one of those plug-in commands that I've always wanted to write but have been too lazy - until now. This one does it as a true toggle, err, well, sort of... It will toggle the same set of snaps on and off regardless of what the user sets in between toggles. This is how it works, the plug-in menu has a boolean parameter that it toggles between "True" and "False" every time it's run. When the boolean is true, it turns the predefined snaps on and when it's false, it turns them off. The user can define the snaps through the plug-in's strings (using the "Plug-in Editor"). I have it set to use "qwsd", but it can be changed to your needs in the "Plug-in Editor".

You can download the plug-in here:

http://panzercad.com/VW%20Freebies/plug-in_menu_commands/snap_toggle/

Edited by Matt Panzer

Share this post


Link to post

Matt, the download link is broken. My browser seems to retrieve a file called, "panzercad.com"

I'm very curious how you did it.

Share this post


Link to post

Doesn't work for me either, perhaps it's a Mac thing?

Edited by Vincent C

Share this post


Link to post

No, I managed it through a PC, it's great! You're a genius Matt :grin: thanks!

Share this post


Link to post

No sweat Vincent. Glad to help!

I'm not sure about the genius comment though... :-)

Edited by Matt Panzer

Share this post


Link to post

copied the file to pluggins folder doesn't seem to come up in the vectorscript pluggin in editor or anywhere else???

Share this post


Link to post

beanus,

I see you're using VW 2009. My shortsightedness led me to create this in VW 2010. VW plug-ins are not backward compatible. I recreated it in VW 2008 and replaced the download with this one, so it should now work in VW 2008 and later. Download again from the link and you should have it working.

http://panzercad.com/VW%20Freebies/plug-in_menu_commands/snap_toggle/

Share this post


Link to post

Matt,

I have been trying to figure out how to do this function forever! So I downloaded your link, however not sure what to do now. Can you back up and please put it in a "Vectorworks for Dummies" version for me? ;) (I am well versed in VW, but just not in scripts and advanced stuff like that.)

When I downloaded, I got the file called "Snaps-.vsm" and don't know what to do next. I'm in VW 2010 Fundamentals Landsmark, on a PC w/ Windows 7.

Thank you so much

Michelle

Share this post


Link to post

to temporarily disable snap hold the tilda '~" ` key

Share this post


Link to post

correction it's ` for me (ie the ~ without holding shift)

Share this post


Link to post

Yes I believe for MAc its the "squiggle" key or tilda apparently. the ` without the shift.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.

×