Jump to content
Developer Wiki and Function Reference Links ×

SetTool (RoundWall)


Recommended Posts

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

Link to comment

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.

Link to comment

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

 

Link to comment

@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

Link to comment

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

@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

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