Jump to content

New Layer, New Class shortcut


Recommended Posts

I know there are other ways of achieving this - I just wondered if it was available as a shortcut, or could be.

eg there are at least 3 ways of moving to the next/previous layer previous/next class etc including keyboard shortcuts. Same for previous View /Next View.

For some of my work it fits my workflow to work from a blank document rather than a fully developed template and add layers & classes as needed : a keyboard shortcut would be helpful.

Thanks for the Quickkeys tip I'll look into that it sounds like it might provide an answer.

Link to comment

You could write a very short Vectorscript and put that into a Menu procedure and than put that into a workspace.

This will do the new layer:

Procedure New_Layer;

Var		
  H1   :Handle;
  S1   :String;

Begin
  S1:=StrDialog('Enter Name for New Layer:','New_Layer');
  If S1<>'' then
    Layer(S1)
  else
    AlrtDialog('You can not use that name for a layer');
End;

Run(New_Layer);

And this will do the new class

Procedure New_Class;

Var		
  H1   :Handle;
  S1   :String;

Begin
  S1:=StrDialog('Enter Name for New Class:','New_Class');
  If S1<>'' then
    NameClass(S1)
  else
    AlrtDialog('You can not use that name for a class');
End;

Run(New_Class);

Go into the Vectroscript Plugin Editor and create a new Menu Command. Paste the above into the Script pane.

Then edit your workspace and assign a keyboard shortcut.

Edited by Pat Stanford
  • Like 2
Link to comment
  • 8 years later...
  • 1 year later...
  • 11 months later...

I have made those script into menu commands and it it very usefull.

I also made one to activate Design Layer-1.

Layer('Design Layer-1');

I have problem making it work when I am on a sheet layer and I run the script;

I get into Design Layer-1 but objects on other layers don't show up if I had Shaded mode and if I had wireframe mode, they are fixed when I use the flyover tool.

@Pat Stanford would you have any clues why ?

2022-01-14-ACTIVE-LAYER-SCRIPT.vwx

Link to comment

It appears that switching to a Sheet Layer turns off Unified View.

 

Try this script instead. It switches to the design layer and then turns unified view back on.

 

Layer('Design Layer-1');
SetPref(94,True);
 

 

The alternative is to use a Saved View instead. You can call that from a script by:

 

VRestore('Your View Name');

  • Like 1
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...