WhoCanDo Posted March 15, 2023 Share Posted March 15, 2023 Hi, SetTool (-208) is a Straight Wall. What is the RoundWall code? Quote Link to comment
MullinRJ Posted March 15, 2023 Share Posted March 15, 2023 In older versions of VW use : SetTool(-318); { Round Wall } In newer versions use : SetToolWithMode(-208, 1, 2); { Round Wall mode of the Wall Tool } I believe you can set other mode buttons of the Wall Tool by changing the middle number to select the button group, and the last number to select the button within that group. I don't know what VW version is the cutoff version. One of these should work for you. Raymond Quote Link to comment
WhoCanDo Posted March 15, 2023 Author Share Posted March 15, 2023 I'll give that a go Raymond. Where do you get the list of number from? The Function Reference page help menu is pretty useless when it comes to actually helping. SetToolWithMode( toolIndex :INTEGER; modeGroup :LONGINT; modeButton :LONGINT); doesn't give any reference to what the numbers are. Quote Link to comment
MullinRJ Posted March 15, 2023 Share Posted March 15, 2023 (edited) I got them from the VS Func Reference Appendix -> SetTool - CallTool Selectors. I used the HTML version that ships with the software, but it is also online in the Developers Wiki. Raymond Edited March 15, 2023 by MullinRJ Quote Link to comment
WhoCanDo Posted March 15, 2023 Author Share Posted March 15, 2023 I've lost you after https://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix#attrCrit Where is SetTool ? Quote Link to comment
MullinRJ Posted March 15, 2023 Share Posted March 15, 2023 Appendix E, after the color palette. Raymond Quote Link to comment
WhoCanDo Posted March 15, 2023 Author Share Posted March 15, 2023 Gotcha. I must have been looking at some other older link. Ta Quote Link to comment
WhoCanDo Posted March 16, 2023 Author Share Posted March 16, 2023 Continuing on a bit, the following is my new "tool". However, I can't seem to apply a keyboard shortcut to that tool ( eg. Alt-9 ), or any tool as far as I can tell. The Edit Current Workspace allows me to allocate Alt-9 to the tool but it doesn't work. Can anyone tell me if it is possible ? On a slightly different subject, the Edit Current Workspace also allows me to apply the keyboard shortcut "9", but doesn't tell me that "9" is already allocated to another tool. procedure RWall; begin { -208 Wall Tool } SetToolWithMode(-208, 1, 2); { Group 1, Selection 1 ie Straight Wall } SetToolWithMode(-208, 2, 1); { Group 2, Selection 1 ie Top alignment clockwise } { yet to include wall style option } end; run (RWall); Quote Link to comment
MullinRJ Posted March 16, 2023 Share Posted March 16, 2023 @WhoCanDo, I just found out the cutoff for the tool numbers is VW 2022 and older use -318 for the Round Wall, while VW 2023 uses -208 for the Wall tool, but the second mode is now the Round Wall tool. Now my question is, what version of VW are you running? The same command SetToolWithMode() can be used in any version of VW from 2016 onward, but the tool number and the mode buttons you set will change in VW 2023 and beyond, compared to the ones you would use before VW 2023. If your signature is correct, then you will want to use: SetTool(-318); { Round Wall Tool } SetToolWithMode(-318, 1, 1); { Group 1, Selection 1; ie Left Control Line Mode } In VW 2023, and presumably newer, use: SetToolWithMode(-208, 1, 2); { Group 1, Selection 2; ie Round Wall Mode } SetToolWithMode(-208, 2, 1); { Group 2, Selection 1; ie Left Control Line Mode } Raymond Quote Link to comment
WhoCanDo Posted March 16, 2023 Author Share Posted March 16, 2023 vw2023 - My script works fine. I'm not sure we are talking about the same "tool". tool = workspace editor = When I chose the keyboard shortcut Alt-9 in the Workspace Editor, it doesn't work from the keyboard. Quote Link to comment
MullinRJ Posted March 16, 2023 Share Posted March 16, 2023 (edited) SP3 or SP4? I just remembered there was a bug in SP3 where the ALT keys for tools did not work. It seems to be fixed in SP4. If you're still on SP3, I recommend you upgrade to SP4. I'm using SP4 with OPT-9 set to your New Round Wall tool. When I press OPT-9 it almost sets the tool up, as the name shows in the Tool Bar, but none of the button icons appear. After I click once in the drawing, then the tool's mode buttons appear. When I click the second time I can draw with the New Round Wall tool. I'm on a Mac, so the behavior may be different on your PC, but it's still not working the way I expected to. Can you describe in more detail what's happening your end? Raymond Edited March 16, 2023 by MullinRJ Quote Link to comment
MullinRJ Posted March 16, 2023 Share Posted March 16, 2023 @WhoCanDo, I just placed your script into a Menu Command, placed that command in my Custom Menu, and assigned Cmd-Shift-9 to it. It works without the extra overhead of having to click in the drawing. I think that initial click is a built in penalty required when using tools vs. menu commands. You have to click in the drawing for the script to run. If using a hotkey for a menu command instead of a tool does not rail against the tenets of your core beliefs, may I recommend giving it a try to see if it will work for you? HTH, Raymond Quote Link to comment
WhoCanDo Posted March 16, 2023 Author Share Posted March 16, 2023 Thanks Raymond, Yes there is an update to SP4 that I didn't know about. After installing SP4, Alt-9 still doesn't work for a Tool type. I'll also use your idea Ctrl-Alt-9 (Windows) for a Menu command. For anyone else reading @Julian Carr also suggested using 9 U to toggle through Group 1. Thanks all. 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.