Jump to content
paul_cardinale

Programmatically Turn AutoTool On/Off

Recommended Posts

Is it possible to programmatically turn Automatic Tool Selection on & off?

I found a ToolNumber property, but it always throws error 1028 (LabVIEW: (Hex 0x404) Attribute selector is invalid).  I have no idea what that means.

ats.png

Share this post


Link to post
Share on other sites

I don't know of a way to do this. The closest thing would be to show the Tools palette with the 'Tools Palette Open' property, then use OS calls (like user32.dll on Windows) to simulate a mouse click to turn the auto tool on/off.

image.png.8f2cd5eadadbb7af77f7e4f9848ba3ae.png

Share this post


Link to post
Share on other sites

What is your use case that you need to turn it on and off?  I suspect you already know but there is an INI key that turns it on and off but is only read on LabVIEW start.

Share this post


Link to post
Share on other sites

I'm working on a test executive framework (for both test execution and development).  The test step editor places the block diagram of a test wrapper VI in a SubPanel.  It works fine, but when the framework is running, within that panel, you can't change tools by tabbing.  I want the test executive to turn on AutoTool selection so the test engineers using it won't have to.

Edited by paul_cardinale

Share this post


Link to post
Share on other sites

I looked at App:Tool Number... it's code has never been implemented (which is why it is still private, presumably). Someone put it in as a placeholder and then decided they didn't actually need it. Should have been backed out but wasn't.

I don't know of any programmatic control over the autotool. I'm not saying it doesn't exist, but I don't know of any.
Can you fire a shift+tab key at LabVIEW using OS calls before the framework starts running?

Edited by Aristos Queue

Share this post


Link to post
Share on other sites

I want to turn AutoTool on.  Shift-Tab toggles AutoTool on/off.  That would be useful if there is a way to check the state of AutoTool.

Share this post


Link to post
Share on other sites
8 hours ago, paul_cardinale said:

I want to turn AutoTool on.  Shift-Tab toggles AutoTool on/off.  That would be useful if there is a way to check the state of AutoTool.


None that I could find. That kind of meta control of the LabVIEW IDE is not something we’ve ever focused on as a feature. 

Share this post


Link to post
Share on other sites

Ok.  As an alternative, is there a way to get the tab key to function as a tool selector on a block diagram that's in a SubPanel of a running VI?

(It seems that the VI that owns the SubPanel is swallowing the keystrokes).

Share this post


Link to post
Share on other sites
7 hours ago, paul_cardinale said:

Ok.  As an alternative, is there a way to get the tab key to function as a tool selector on a block diagram that's in a SubPanel of a running VI?

(It seems that the VI that owns the SubPanel is swallowing the keystrokes).

Probably not. LabVIEW gets out of the way of the running front panel for you to have full control of your app, but there's never been a reason for us to do that for a block diagram. I doubt there's a way to achieve what you're trying to do in LV as it stands.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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

Important Information

By using this site, you agree to our Terms of Use.