Andy Broomell Posted January 30, 2018 Share Posted January 30, 2018 Is there a way to set defaults for tools in such a way that the settings apply across all files? My current understanding is that all of this is stored on a per-document basis via "special record formats" [which you can see when you Purge], meaning that I should set up default settings in my template file. However, more often than not I'm taking over files that were started by other people rather than beginning with my own template, meaning I have no control over tool defaults. As a simple example, every single time I use the Camera tool I want the Aspect Ratio to be 16:9. I know how to make this be the default in my template, but when I'm in someone else's file it reverts to starting at 4:3. I know how to click the Preferences button to change the default for future cameras in said file, but I have to do this every single time I open a different file. I want to set a global default somehow - is this possible? Out of curiosity, from where do tools pull their default parameters when you're in a completely blank file? Is that hardcoded into the each tool's coding? (An exception being tools like Select Similar and Eyedropper which have their own xml files in order to keep settings the same across all files.) Quote Link to comment
markdd Posted January 30, 2018 Share Posted January 30, 2018 What I do with the tools I use regularly is adjust the default parameters within the plug-in manager. The Renderworks camera's settings is one of the tools that can be changed to suit your needs and this will apply on every document you use going forward. You will need to do this from a purged file where no hidden record exists for the tool you are changing otherwise the settings you write to the tool won't appear. Hope that works for you Mark Quote Link to comment
Andy Broomell Posted January 30, 2018 Author Share Posted January 30, 2018 Oh that's right, I forgot this exists. I remember playing around with the Plug-In Manager a few years ago but none of the changed settings would ever "hold". However, I believe this was somewhat addressed in the last few years. Does it now hypothetically work for all tools, or is it somewhat hit-or-miss? ........ Just now starting to play around with it.... Already I see that I can't seem to edit any of the parameters for the Renderworks Camera. The options are greyed out. Now I'm trying the Stake tool - also greyed out. But I'm able to edit the Drawing Label defaults, so that's good. What's behind the inconsistency? I understand not being able to edit code on VW tools, but changing default parameters should be allowed for everything. No? Quote Link to comment
markdd Posted January 30, 2018 Share Posted January 30, 2018 I see, you're right. I have no idea why there is this inconsistency. Most of the Spotlight Tools are not locked down like this. The Instrument Summary tool being a good example. Maybe VWX are locking some tools in an attempt to save us from ourselves! Quote Link to comment
Kevin McAllister Posted January 30, 2018 Share Posted January 30, 2018 (edited) Newer tools tend not to work. Older tools used to all be available as this was the standard way of setting defaults many versions ago. As things get updated, they sometimes stop being available. In the case of the Renderworks Camera you should be able to set the defaults by selecting the tool, clicking on the Preferences button in the mode bar and entering your settings. When you click OK to exit those settings are supposed to be saved as the default. Kevin Edited January 30, 2018 by Kevin McAllister Quote Link to comment
Andy Broomell Posted January 30, 2018 Author Share Posted January 30, 2018 6 minutes ago, Kevin McAllister said: In the case of the Renderworks Camera you should be able to set the defaults by selecting the tool, clicking on the Preferences button in the mode bar and entering your settings. When you click OK to exit those settings are supposed to be saved as the default. But that seems to be file-specific? Quote Link to comment
Kevin McAllister Posted January 30, 2018 Share Posted January 30, 2018 10 minutes ago, Andy Broomell said: But that seems to be file-specific? After some testing I would agree..... that is super weird. Why would anyone want it to be file specific? I would never remember to set all that up in a template file. I wonder if that's true of all the tool preference settings. @JimWare tool preference file specific? I'm surprised I haven't noticed this before. Kevin Quote Link to comment
Pat Stanford Posted January 31, 2018 Share Posted January 31, 2018 PIOs (Tools and objects) that are written in VectorScript usually have editable defaults in the PlugIn Editor. Ones that are written in the more powerful Software Development Kit (SDK) typically are not. Could you go into your template file(s) and place one instance of each type of object to set the defaults the way you want? You could then delete the placed objects and save as a template. When you create a new document from the template it should have the correct defaults. Quote Link to comment
Andy Broomell Posted January 31, 2018 Author Share Posted January 31, 2018 6 hours ago, Pat Stanford said: Could you go into your template file(s) and place one instance of each type of object to set the defaults the way you want? You could then delete the placed objects and save as a template. When you create a new document from the template it should have the correct defaults. Yes, but: 19 hours ago, Andy Broomell said: more often than not I'm taking over files that were started by other people rather than beginning with my own template, meaning I have no control over tool defaults. I've already set up various tools as I like them in my template, but only a fraction of the projects I work on begin with my template. Sounds like there's no way to set global defaults, which is disappointing. Thank you all for your help! Quote Link to comment
Pat Stanford Posted January 31, 2018 Share Posted January 31, 2018 A different thread triggered something far back in my brain. I think you can use a Vectorscript (or python, or SDK) to change the Parameter record defaults. Using the SetRField command if you pass NIL as the handle instead of a handle to an object, I think the defaults will be changed. Since you need to do this on multiple files, it might be worth the time to create the script that would go through and change the defaults. You can either try or let me know an object/tool that you would normally change and what the field you want changed and what value you want it set to and I can give you a demonstration script to start from. Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted February 1, 2018 Vectorworks, Inc Employee Share Posted February 1, 2018 Pat, to get the handle to the default object or tool settings record, I think you don't pass a NIL handle, instead pass a handle obtained by GetObject() and the universal name of the PIO or command. For example, to set the default top shape of a door to a Gable, use the following one-line script: setrfield(getobject('Door'),'Door','TopShape','Gable'); HTH. Quote Link to comment
Pat Stanford Posted February 1, 2018 Share Posted February 1, 2018 Thank you Robert. As usual, you are correct. Using Nil still somehow rings a bell for something, but it certainly does not work for seeing PIO defaults. :-( Quote Link to comment
Vectorworks, Inc Employee Robert Anderson Posted February 1, 2018 Vectorworks, Inc Employee Share Posted February 1, 2018 Yeah, I agree about the NIL handle thingie. Don't have time to search the VS Function Reference, though... Quote Link to comment
Pat Stanford Posted February 1, 2018 Share Posted February 1, 2018 Same here which is why I posted it without testing. My bad. 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.