MarcelP102 Posted December 6, 2021 Share Posted December 6, 2021 Hi jesse, I'm getting the message "No saved views found in drawing". Also in a complete new file with simple name for the saved view. I'm using a non-English language, can that cause a problem? Perhaps a englisch text is hardcoded? Saved views called 'tekenzones' in the dutch version of VW. 1 Quote Link to comment
Jesse Cogswell Posted December 7, 2021 Share Posted December 7, 2021 @MarcelP102 Good catch! Since Saved Views are technically stored as Script resources, my script filters out any script outside of the default location of Saved Views in the Resource Manager, named "Saved Views" in the English version. The good news is that this is a really simple fix that you can do. Vectorworks has a built in way to be able to localize plug-ins without getting to the source code in cases like these where something needs to be coded in using strings. If you go to the Plug-in Manager, find my Saved Views to Viewports plug-in in the Third-party Plug-ins tab and click the Customize button, you should get a dialog box to pop up. The third tab should be named Strings. Double click on Resource ID 5000, labeled Misc Strings. From here, the one you are looking for is Resource ID 5006, which is likely set to "Saved Views". Double-click this and type in the name of the folder in the Resource Manager where Saved Views are stored. Then my plug-in should be able to find your Saved View. Consequently, all of my scripts can be localized in this way if you would prefer them to be in your native language. For this particular one, the only strings you shouldn't change are 5000 and 5001, as they're the file paths to the checkmark and blank icons needed for the list browser, but all of the rest of them are free to be changed. Please let me know if you need any further help with this. It's a feature I really like and appreciate but can be on the clunky side. 3 Quote Link to comment
MarcelP102 Posted December 7, 2021 Share Posted December 7, 2021 Yes, that worked, thanks! Quote Link to comment
Jesse Cogswell Posted December 28, 2021 Share Posted December 28, 2021 All, I have incorporated some requests from @line-weight to the Saved Views to Viewports command. These changes include: Patched bug when creating viewports on sheet that is currently active not updating Viewport properly Added Viewport Scale to List Browser. If empty, Viewport Settings will populate with currently active layer scale Allows for selecting multiple rows of List Browser. Viewport Settings dialog will show limited fields, just Sheet Layer and Viewport Scale Added Generate Name from Saved View Name button to the main List Browser I tested this in VW2019 and VW2021. Please let me know if there are any troubles. I've never tried it, but I assume that replacing an existing plug-in with this file will wipe out any localization that's been done to the plug-in (such as the name of the Saved Views folder), so be prepared to redo any localization that has been done. Saved Views to Viewports.vsm 1 Quote Link to comment
line-weight Posted December 30, 2021 Author Share Posted December 30, 2021 Thanks for this! Not able to test right now, but I'll do so next week. Quote Link to comment
line-weight Posted January 10, 2022 Author Share Posted January 10, 2022 @Jesse Cogswell sorry for the delay but I've now had a chance to test this out (in VW2021) and as far as I can see all is working perfectly . Thank you for the additional changes - the ability to bulk-copy from multiple saved views will be a massive time-saver for me. It takes a while to do its stuff (about 30 seconds when I tested it doing 15 saved views/viewports) but my guess is that this is Vectorworks itself, creating the viewports in what is quite a large model, rather than a slowness in the script. Thanks again for this. Quote Link to comment
Josh_M_Gill Posted August 20 Share Posted August 20 On 10/21/2020 at 6:02 AM, Kars Keizer said: Is this what you are looking for? VS:GetVPClassVisibility https://developer.vectorworks.net/index.php/VS:GetVPClassVisibility VS:SetVPClassVisibility https://developer.vectorworks.net/index.php/VS:SetVPClassVisibility VS:GetVPLayerVisibility https://developer.vectorworks.net/index.php/VS:GetVPLayerVisibility VS:SetVPLayerVisibility https://developer.vectorworks.net/index.php/VS:SetVPLayerVisibility Silly question but how do I implement these scripts? I have loaded scripts before but I cannot even seem to access these. Quote Link to comment
Jesse Cogswell Posted August 20 Share Posted August 20 @Josh_M_Gill The way to install the scripts are as follows: Download the .vsm file from my post above to your User Folder in the Plug-ins Folder. This can be tricky to find the actual location of if you haven't done it before, but the easy way to get to it would be to open up your Vectorworks Preferences and select the User Folder tab. Then click the Explore button to open it in an Explorer window. Make sure the .vsm folder is in the Plug-ins folder and restart Vectorworks. Next we need to get the script into your Workspace. Go to Tools - Workspaces - Edit Current Workspace. Select the Menus tab. In the box on the left, find and expand the JNC category. In the box on the right, find a menu to put them in, such as View or Tools. Click and drag the menu commands from the box on the left to the desired menu on the right. Click OK to close the dialog and rebuild the Workspace with the new commands. 2 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.