Jump to content

Hello Community!

This Thursday, October 21st, from 6 pm to 7 pm EDT, we will be performing an update on the Vectorworks Community Board. During this time, the site will be unavailable.

Vectorscript for "Make Guide"?


Recommended Posts

I'd like to be able to use the "Make Guide" command with the keyboard shortcut "G", but simple keystrokes (w/o a modifier) are only available for tools and not menu items, for whatever strange reason. I thought it might be possible to make a tool script that executes this command and then assign that shortcut to it. Can someone enlighten me what the syntax would be for running that command in VectorScript? Thanks!

Link to comment

Sorry for being no help on a non-modified keystroke for Make Guide but I've been using for years. The forward slash is right above the right command key on macs. I think as important is the unlock command to go with it. A script for an unlocked Make Guides would make sense. I do use for Unlock and for Lock which are directly above the /.

Link to comment

Create a new "Tool" PIO, paste in the following code.

Next, add it to your workspace and set a keyboard shortcut to the tool.

====================

PROCEDURE Set2Guide;

VAR

x, y : REAL;

h : HANDLE;

BEGIN

DSelectAll;

GetPt(x,y);

h := PickObject(x, y);

IF h <> NIL THEN BEGIN

SetSelect(h);

DoMenuTextByName('Guides',1);

DoMenuTextByName('Unlock',0);

END ELSE SysBeep;

END;

Run(Set2Guide);

Link to comment

Using the "DoMenuTextByName" command I've also made a script for selecting all guides (so that I can assign the shortcut option+G to it). Can something be added to the script so that the command is executed immediately, i.e. doesn't require another mouse-click?

Currently, the script looks like this:

PROCEDURE SelectGuides;

BEGIN

DoMenuTextByName('Guides',2);

END;

RUN (SelectGuides);

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