Michael Gilbert Posted November 9, 2017 Share Posted November 9, 2017 Trying to understand basic of vectorscripts by just looking at very basic scripts I keep seeing CallTool followed by a number in brackets, e.g. CallTool(-209); Am I right in assuming that 209 refers to a specific tool? If so is there no way to get a list of Tools & references numbers? Thanks Michael Quote Link to comment
MullinRJ Posted November 9, 2017 Share Posted November 9, 2017 Michael, Look in the Vectorworks 201x Script Function Reference. There is an online copy at http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#settool. There is an HTML version on your computer that can be found in the application folder; Vectorworks 201x -> VWHelp -> Script Reference -> ScriptFunctionReference.html. Look in Appendix E for SetTool-CallTool Selectors. All tool selectors will have negative numbers. Raymond Quote Link to comment
MullinRJ Posted November 9, 2017 Share Posted November 9, 2017 And YES, -209 refers to the Symbol Tool. Quote Link to comment
Pat Stanford Posted November 9, 2017 Share Posted November 9, 2017 The CallTool command is used in many of the sample scripts. It is used to activate a specific tool. As Raymond says, it is available in the Vectorworks Appendix. But those might not be the best scripts to be learning from. I am not certain, but I have probably only used CallTool in a couple of the 1000+ scripts I have written over the years. Unless you really want to write extremely simple scripts that do things like set layers, classes and attributes and then activate a given tool, you might be better off telling us what kinds of things you want to do and we can point you to more appropriate samples. 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.