Bobillier Posted June 1, 2021 Report Share Posted June 1, 2021 Hi Do you know if there is a way to switch unwired tunnels to their default values by scripting? Quote Link to comment
dadreamer Posted June 1, 2021 Report Share Posted June 1, 2021 You should use Use Default if Unwired property. I couldn't come quickly with a good example, you may take a look at this post for the start. Quote Link to comment
Bobillier Posted June 1, 2021 Author Report Share Posted June 1, 2021 Yes, It's exactly what I'm looking for. Thanks Now I will try to do QD to automatically do this with few tunnels in few stacked case structures. Quote Link to comment
Bobillier Posted June 1, 2021 Author Report Share Posted June 1, 2021 Here the QD Instalation: Save it in quick drop plugins folder Usage: Select few unwired tunnels in one or few stached case structure and run the QD Short-cut [U] (can be modify in the vi documentation texte) LV2018 Set Tunnels Default Values.vi Quote Link to comment
Bobillier Posted June 1, 2021 Author Report Share Posted June 1, 2021 Oups minor correction to avoid debug windows when loaded. Set Tunnels Default Values.vi Quote Link to comment
Antoine Chalons Posted June 2, 2021 Report Share Posted June 2, 2021 (edited) 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 June 2, 2021 by Antoine Chalons Quote Link to comment
Antoine Chalons Posted June 2, 2021 Report Share Posted June 2, 2021 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 Quote Link to comment
Bobillier Posted June 2, 2021 Author Report Share Posted June 2, 2021 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 Quote Link to comment
Antoine Chalons Posted June 2, 2021 Report Share Posted June 2, 2021 here it is in 2018 Set Tunnels Default Values_modified.vi Quote Link to comment
Bobillier Posted June 2, 2021 Author Report Share Posted June 2, 2021 (edited) 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 June 2, 2021 by Bobillier Quote Link to comment
Antoine Chalons Posted June 2, 2021 Report Share Posted June 2, 2021 I see. Indeed it's a different approach. Traverse for GO ignores the BD selection. My version could be modified to deal with nested case structures. 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.