brudgers Posted September 23, 2009 Share Posted September 23, 2009 Is there a simple way to retrieve the ID/Name of the currently active tool within vectorscript? Quote Link to comment
Pat Stanford Posted September 24, 2009 Share Posted September 24, 2009 What are you trying to do? PushAttrs; and PopAttrs: will let you save the existing settings at the beginning of your routine and put them back when you are done. If you actually need the tool ID for something else I don't have a good suggestion. Quote Link to comment
brudgers Posted September 24, 2009 Author Share Posted September 24, 2009 I'm trying to modify one of my kludge tools. I would like it to restore the previous tool. After posting I tried push and pop, but since my kludge tool has already been called at that point the previous tool was not restored. Essentially, Proceedure s as vectorworks tool; Begin Pushattrs; Do(something); Popattrs; end; Run(s); was not making the previous tool active. What I'm looking for is Proceedure s as vectorworks tool; Begin Get(previous tool); Do(something); Restore (previous tool); end; Run(s); Quote Link to comment
Pat Stanford Posted September 24, 2009 Share Posted September 24, 2009 Run it from a menu command rather than from a tool. Once a new tool has been clicked, you are not going to have a way to find out what the previous tool was. Back to the discussion of Tools vs. Commands. Quote Link to comment
brudgers Posted September 24, 2009 Author Share Posted September 24, 2009 (edited) I realized the problem. Information regarding the previous tool/command is likely to be available on the undo stack, but I be surprised if that information is accessible. Thanks anyway. As for Tools and Commands: Client 1: Excuse me. Mr. Wiggin: Yes? Client 1: Did you say 'menu'? Mr. Wiggin: Vectorworks menu, yes. Client 2: Do I take it that you are proposing a text based interface? Mr. Wiggin: ...Does that not fit in with your plans? Client 1: Not really. We asked for a simple block of icons. Mr. Wiggin: Oh. I hadn't fully divined your attitude towards application usability. You see I mainly design slaughter houses. Clients: Ah. Mr. Wiggin: Pity. Clients: Yes. Edited September 24, 2009 by brudgers 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.