Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
GJ

Single Click Tools

Recommended Posts

Is it possible to save what would normally be a menu script as a tool that works with one click on the tool icon?

Let me 'splain:

I would like to create a tool palette that is essentially a visibilty strip that toggles various Layer/Class/Pref settings with one click.

I have been able to save a script as a tool, but it requires a click on the drawing to activate. Is it possible to circumvent this?, or to add a random pick in the script ?

Thanks,

Gary

Share this post


Link to post

the other way is to make the tool into a command, like a menu command. Then add it to your right mouse click.

Right mouse click, choose preference script and presto!

Share this post


Link to post

I've worked with both of those methods.

I'm trying to avoid a context menu item (I have quite a large context menu now)

The vectorplugins layer manager is close to what I had in mind, however it still requires a click in the drawing. There are two functions in the script that I do not understand:

SetTool(-128);

and

SetCursor(ArrowC);

Neither of those functions are in the VW12 script reference. Maybe that was a solution to this problem prior to VW12.

Thanks,

Gary

Share this post


Link to post

Sorry, I found SetTool and SetCursor, but I couldn't find the tool ID for -128

Share this post


Link to post

There's no way to make a vectorscript behave in this way, at least not at the vectorscript level. In most drawing programs a tool is for working in the drawing window.What you are doing is more of a command.

I often make this type of script into a menu command with keyboard shortcut.

As funky as it seems, double clicking a script palette command is actually pretty close. The millisecond it takes for the second click isn't that big a deal. The script palette becomes portable thru the use of a template, and is a kind of tool palette in it's own way. I run some commands this way as well.

Share this post


Link to post

Thanks ccroft,

I'm starting to realize that this may be impossible.

I got the idea while playing around with a toggle palettes and full screen script that seemed alot like the full view buttons at the bottom of the Photoshop tool palette.

Share this post


Link to post

Hi GJ,

I suffered from the same frustration. I've made the tools at the VectorPlug-ins site, the layer changing ones need the dreaded 'click at the drawing'.

SDK programming can do it, as you will see in the free (but Mac only) tools by Manuel Paredes at www.vectorbits.com

regards,

Alexandre

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.

×