Chris Burton Posted February 26, 2023 Share Posted February 26, 2023 Can I 'save' Vectorscripts that I create in a single file to the Resource Manager so that I can run the same scripts in any file I'm working in? The scripts I am using are ones that I've created through the Custom Selection tool. Quote Link to comment
MullinRJ Posted February 26, 2023 Share Posted February 26, 2023 (edited) You can save your master file as a template (.sta) and when you open new files using that template your scripts will be included. Use menu File > Save As Template... OR You can create Menu Command plug-ins from your scripts with the Plug-in Manager (Shift-Cmd-Z), which are subsequently added to the VW interface with the Workspace Editor (Option-Shift-Cmd-W). Hot keys can be assigned to your scripts in the Workspace editor so you can quickly access them, too. This is the more tedious route, but the more flexible one If you need help with either of these options, please write back. Raymond Edited February 26, 2023 by MullinRJ Quote Link to comment
Chris Burton Posted February 26, 2023 Author Share Posted February 26, 2023 1 minute ago, MullinRJ said: You can save your master file as a template (.sta) and when you open new files using that template your scripts will be included. Use menu File > Save As Template... OR You can create Menu Command plug-ins from your scripts with the Plug-in Manager (Shift-Cmd-Z), which are subsequently added to the VW interface with the Workspace Editor (Option-Shift-Cmd-W). Hot keys can be assigned tour scripts in the Workspace editor so you can quickly access them, too. This is the more tedious route, but the more flexible one If you need help with either of these options, please write back. Raymond Thanks Raymond. As I normally 'inherit' my files from other users, I think the your second suggestion may be better for me. How would I start by going this route? Quote Link to comment
Pat Stanford Posted February 26, 2023 Share Posted February 26, 2023 Or you can put the files into a Library file in your Favorites. You will have to Import the scripts when you want to use them, but you can access them from the RM. Quote Link to comment
Chris Burton Posted February 26, 2023 Author Share Posted February 26, 2023 7 minutes ago, Pat Stanford said: Or you can put the files into a Library file in your Favorites. You will have to Import the scripts when you want to use them, but you can access them from the RM. That's is what I thought to try to do, but I couldn't figure out how. Could you walk me through it? Quote Link to comment
MullinRJ Posted February 26, 2023 Share Posted February 26, 2023 @Chris Burton, 1) Check out this link and read what Robert Anderson wrote several years ago. I think most of it is still relevant. 2) Open the Plug-In Manager and create a new plug-in – type Command, it's the top choice. Give it a name, and click Enter. 3) Next, click the Edit Script... button and paste your script code here. Select Vectorscript or Python and click OK. 4) Next, click the Edit Definition... button and select the Properties tab. Here you and add a Tool Tip to describe your command when you hover over it with the cursor, and set any restriction on how it executes. Mostly, NONE is acceptable, unless something needs to be selected. 5) Click OK, then click Close. 6) Wash – Rinse – Repeat for each script you want to immortalize. Are you familiar with the Workspace Editor? If not, write back if you need help to add your new commands to a menu. Raymond Quote Link to comment
Pat Stanford Posted February 27, 2023 Share Posted February 27, 2023 Make a standard Vectorworks file with your scripts in it. Select it in the Resource Manage and choose Add Selected File to Favorites from the gear icon. This file with your scripts will now show in the Favorites section of the left hand column of the Resource Manager. When you need a script in a file, open the RM, select the Favorite File and then right click on the Script(s) or Script Folders that you need and choose Import. Quote Link to comment
Chris Burton Posted February 27, 2023 Author Share Posted February 27, 2023 Pat, thanks very much for that. I appreciate the help. That worked. Raymond, thank you for your help also. I'll explore your suggestion later, but for now, I have it working as I need. much obliged, Chris Quote Link to comment
Peter Z Posted June 8, 2023 Share Posted June 8, 2023 Hey @Pat Stanford, can I piggyback on this conversation? My question is similar. I am creating a .sta file for my team and it should also include scripts as menu commands (called by shortcuts ) whats the most convenient way pass the script on? the .sat file and special workspace are distributed via the workgroup folder Quote Link to comment
Pat Stanford Posted June 8, 2023 Share Posted June 8, 2023 It sounds like you have actually made Plug-in Menu Commands out of your scripts. That means that there is no longer any link between that and a specific file, not even a stationary (.sta) file. You will need to transfer the Plug-in to each user who needs it and either transfer the workspace they have been added to or instruct them on how to edit their workspace to add the commands. On Mac the custom menu commands are stored at: Workspaces are at: Path on Windows is similar but I don't know it off the top of my head. The Menu commands should have a file extension of .vsm Plug-in Objects are .vso Plug-in Tools are .vst It actually looks like you could also store the files in a similar path in a Workgroup folder so as long as you put the workgroup somewhere that they can always access it (i.e. on a synced dropbox location if you have people who will be using a laptop away from the office) then you should only need a single copy of the files in the workgroup. I seem to remember that Workspaces in the Workgroup could be challenging as a user could end up editing the workspace and changing it for everyone. HTH Quote Link to comment
Peter Z Posted June 8, 2023 Share Posted June 8, 2023 Hey @Pat Stanford thanks. Alright I‘m gonna try that folder path inside the workgroup folder, it makes sense. Our folders are indeed synced inside the company network. The only thing I‘m not sure is if the workspace will find the connection to the script, but let’s see. Would you have a different approach in mind to do this? Actually my experience with workspaces in workgroups was that if someone would edit the shared workspace it would immediately be copied into the user folder and edited from there, so the workgroup workspace stays untouched. Quote Link to comment
Pat Stanford Posted June 8, 2023 Share Posted June 8, 2023 Workspaces find plug-ins by name, not by path, so that should not be a problem. One thing to watch out for is that the priority order is User Folder > Workgroup Folder(s) > Application Folder. So if someone copies the Plug-in Menu Command from the Workgroup to their User Folder they will not see future modification to the command unless they copy it over again. I am pretty much a solo so my experience with Workgroup Folders is limited. Nice to hear that they work OK. Quote Link to comment
Peter Z Posted June 14, 2023 Share Posted June 14, 2023 Hey @Pat Stanford just wanted to report, that your approach works perfectly. Storing the vsm file in the Plug In folder in the Workgroup Folder. The workspace finds it and can use it with a shortcut. Thanks a lot 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.