Jump to content

Custom Tool/Attribute


Recommended Posts

Hi @ all ,

using the tool "Custom tool/Attribute" safes the current tool and attributes to a script. I tried to safe a setting including the "move by points tool" which workes fine, but it does not safe the preferances of this tool, for example number of copies, Retain etc. The generated script is as follows:

Procedure CustTool;

VAR

Name:STRING;

Result:BOOLEAN;

BEGIN

PushAttrs;

CallTool(-352);

PopAttrs;

END;

Run(CustTool);

Is there a possibility to add parameters to the CallTool (-352) command, which safes the preferances of the tool ? Or is there no way at all to safe the preferances of tools ?

Thanks for all suggestions :-)

Link to comment

It is not possible to manually save those settings but it isn't required anyway.

the CallTool command just activates a tool and will do anything the tool is programmed to do, including keeping track of it's settings.

I've tried your script and the tool settings are saved without any problem. I see you are using 2016, might be related if anyone else can verify.

Edited by hippothamus
Link to comment

Hi again and thanks for reply :-)

What I intended to do is the following:

Im using the "move by Points" tool a lot, and it is a bit annoying to swich between the "retain" and "No retain" option. ( It's always 3 clicks). So I thought two scripts for that would be fine, one that sets the move by point tool with "Retain" activated and one that does not...

I've tried the scripts in VW 2015 too with the same result: The script works properly, but the preferances of the tool will not be changed, VW always keeps the last settings of the document. It seems to be no issue of VW2016. Maybe what I'm trying does not work at all...

I've read a bit about the "PushAttrs" command, it seems that this command is responsible for the tool preferances, but there seems to be no Attributes list for the "MoveByPoints" command. But maybe I'm totally wrong...

Link to comment
Hi again and thanks for reply :-)

What I intended to do is the following:

Im using the "move by Points" tool a lot, and it is a bit annoying to swich between the "retain" and "No retain" option. ( It's always 3 clicks). So I thought two scripts for that would be fine, one that sets the move by point tool with "Retain" activated and one that does not...

I'm pretty sure this is impossible, unless the tool saves its settings into the active document which you could change prior to calling the tool. IF that is the case, the tool should remember your last setting when you close VW and reopen the same drawing.

Most cases, this is a private setting in the tool event sink and can't be changed manually.

I've tried the scripts in VW 2015 too with the same result: The script works properly, but the preferances of the tool will not be changed, VW always keeps the last settings of the document. It seems to be no issue of VW2016. Maybe what I'm trying does not work at all...

This is intended behavior.

The PushAttrs command has nothing to do with tool modes / settings.

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