Testing If a Tool is Selected
-
How can I test whether a tool has been selected? I want to use the test in an IF - ELSE branch. I have tried the T command but I can't figure out if it is returning anything that I can use to test.
-
@bret
I believe you should be able to use state.currentTool as the variable to determine which tool is currently loaded. -
@alex-cr said in Testing If a Tool is Selected:
state.currentTool
Thanks Alex, that variable did seem to work but only for tool 0. When I picked up T1 and T2, the variable stayed at a value of 0. Is there a list of these variables somewhere and what the different values mean?
-
@bret
That is in from the object model. You can turn it on under the plug-in section of DWC. There you can find the different variables . I’m apprised this didn’t update. How did you change tool? Using the tool commands? -
@alex-cr I think it was just my logic error but I'm not sure what the value is when no tool is selected. I think its 0-3 for the tools.
-
I believe it should be -1 when no tool is selected.
-
@alex-cr Thanks, I'lll give that a try.