Jump to content

Setting Tool Defaults


Recommended Posts

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.)

Link to comment

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.

 

5a70a9cb23f53_ScreenShot2018-01-30at17_21_49.thumb.png.9d85db5e0d1ebbc628b600a83604f19d.png

5a70a96f0820a_ScreenShot2018-01-30at17_18_24.thumb.png.721a248912039330897c5c58672712be.png

 

Hope that works for you

 

Mark

Link to comment

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?

Link to comment

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 by Kevin McAllister
Link to comment
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?

Link to comment
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

 

Link to comment

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.

Link to comment
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!

Link to comment

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.

Link to comment
  • Vectorworks, Inc Employee

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.

 

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...