Jump to content

Set Tunnel to default value by scripting


Recommended Posts

I have an issue when using this QDP :

- before using it, my VI has a broken arrow because a tunnel has some missing assignments

- after using it, the VI still has a broken arrow although my tunnel is set to use default if unwired

- if I click on the broken arrow, it turns into a non-broken arrow

What's the best way to force LabVIEW to re-assess the broken / non-broken state?

 

EDIT : also, as you close the I referenc too early (in the false case), the undo doesn't work.

Edited by Antoine Chalons
Link to comment

Here's a versions with a few modifications :

- fixed the undo

- do nothing if launched from panel

- if selection is a case structure, take all tunnels and enable  "use default..." if not already enabled

- if zero tunnel were effectively modified, fail the undo

- if at least one tunnel was effectively modified, force recompile the VI to make sure LabVIEW will re-assess the broken arrow

Set Tunnels Default Values_modified.vi

Link to comment

Thanks Antoine

I have not enough test it before propose it. Sorry

I working on to correct bug when i receive your last message and modified version. Unfortunely, i can't test it because it's in LV2019 and I only have LV2018.

Is there possible to have it in LV2018 ?

Thanks

Link to comment

Thanks Antoine

I have tested your version, but it seems that it did not work if you have more levels of stacked case structures. I think it's because you don't use "Traverse for GObject.vi " like me.

My approach is to select tunnels before applying the change and not the case structure itself.

Here my new version with few corrections about your first remarks

Set Tunnels Default Values.vi

Edited by Bobillier
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.

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.