grant_PD Posted November 15, 2011 Share Posted November 15, 2011 I'm looking for a way to create new layer, new class from either a context window (right click) on the document workspace or by keyboard command. But there's no menu option for create new layer/new class. One must open up a dialog box to do so. Is this possible? Quote Link to comment
Jonathan Pickup Posted November 15, 2011 Share Posted November 15, 2011 you could easily create a menu item that asked for a name, then created that class. I made a tool that when you clicked on a object, it made a class with those graphic attributes. Quote Link to comment
Jonathan Pickup Posted November 15, 2011 Share Posted November 15, 2011 but why not use the Navigation Palette? Quote Link to comment
JBenghiat Posted November 15, 2011 Share Posted November 15, 2011 You could also use the Workspace Editor to add the Layers... and Classes... menu items to either a menu with a shortcut or the contextual menu. (Then command/cntrl-N to create a new one). -Josh Quote Link to comment
grant_PD Posted November 15, 2011 Author Share Posted November 15, 2011 There's a lot of moving about to different palettes, to the point where it's slowing down my workflow. I realized this as I was working in photoshop today. My workflow is to know that I need/want a new layer, create layer on the fly/worry about naming it later, keep drawing. VW makes organization so time consuming that I find that I'm not paying enough attention to the actual drawing itself. Quote Link to comment
Pat Stanford Posted November 15, 2011 Share Posted November 15, 2011 Here is a start on a script to do what you want. It creates a new layer with the same scale as the current layer and a dummy name including the date so you don't end up with a duplicate. You could easily make this into a menu command and assign it a keyboard shortcut. Use as you see fit. Procedure MakeSL; {creates a new layer with a name of Scratch plus the date. Assigns it a light grey } {layer color, and sets the layer scale the same as the active layer.} {Use at your own risk.} {November 15, 2011} {? 2011, Coviana, Inc - Pat Stanford pat@coviana.com} {Licensed under the GNU Lesser General Public License} const Fore=30583; {RBG Value for light/medium Grey} Back=61166; {RGB for light Grey} var H1,ALH: handle; L1: string; {Scratch Layer Name} R1: real; Procedure SetLayerColors; Begin LPenFore(Fore,Fore,Fore); LPenBack(Back,Back,Back); LFillBack(Back,Back,Back); LFillFore(Fore,Fore,Fore); end; begin L1:=concat('Scratch ',date(2,1)); {Set the layer name to date/time} ALH:=ActLayer; if GetLayerByName(L1)=nil then begin R1:=GetLScale(ActLayer); Layer(L1); SetScale(R1); SetLayerOptions(4); {Show/Snap Others} h1:=FLayer; While h1<> nil do begin Layer(GetLName(h1)); SetLayerColors; h1:=NextLayer(h1); end; end; Layer(L1); SetPref(11,True); RedrawAll; end; Run(MakeSL); Quote Link to comment
grant_PD Posted November 16, 2011 Author Share Posted November 16, 2011 Pat, Thanks much. I will definitely give this a try. Sorry I'm so bad with VS. Quote Link to comment
Pat Stanford Posted November 16, 2011 Share Posted November 16, 2011 Not a problem. If you need help, just ask. I just happened to have this script that I mostly wrote back in 2008 for someone else. I will be happy to help with modifications or lessons on how to make it a menu item. Just ask. Quote Link to comment
Recommended Posts
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.