LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Wim.Tormans

Add the ability to replace a disable structure with a case structure

Status: New

Hi,

 

when I have to rework a vi, i usually start by putting the existing code in a disable structure

and then start working in the disabled 'case'.

 

Quite often I end up trying to replace the disable structure with a case structure to test the new or reworked vi.

 

Now I have to copy everyting into a temporary vi, remove the disable structure, put a case structure in place, paste again and rewire iputs and outputs.

 

Please add the ability to replace the disable structure with a case structure.

19 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

For what it's worth here is a workaround for this missing feature:

 

-surround each case content by a sequence structure. Make sure you encompass each input and output without cutting corners to that their layout is preserved. Label the sequence structure with the case name. Drag the sequence out of the disable structure somewhere nearby on your diagram.

- repeat for each case.

- delete the disable diagram structure and replace by a Case structure

- move back each sequence structure in a case

- label each case with the name of the sequence it contains (or whatever you wish). Reconnect inputs and outputs. Remove the sequences (Right-Click >> Remove Sequence).

- Voila.

 

PS: at no time should you Ctrl-B (Ctrl-Bomb) your diagram, as this could have pretty disastrous effects.

 

We REALLY need a native shortcut for that...

ouadji
Trusted Enthusiast

already almost five years and still nothing.

too bad !  Yet this feature would be very useful

tst
Knight of NI Knight of NI
Knight of NI

If you really feel you need this, you could write code which would do this yourself (by doing something like what X. describes). In LV 2015, you can also add it to the context menu.


___________________
Try to take over the world!
DjTony
Member

 UP UP UP UP....

it really will be a great improvement.

RavensFan
Knight of NI

Don't just say "UP UP UP UP".

 

Be sure to click the star next to the idea to register your kudo.  The number of kudoes is what NI uses to measure the popularity of the idea.

Zieleslaw
Member

Here it is! A QuickDrop shortcut swapping Disable Structure with Case Structure and Case Structure with Disable Structure.

https://github.com/Zieleslaw/Swap-DDS-and-CS/releases/tag/v1.0.1-alpha

Feel free to add issues to my GitHub - as you can see there I want to add right-click shortcut for structures that will call swapping VIs.

 

I looked at Saphir ViBox - Quick Drop (https://forums.ni.com/t5/SAPHIR-Toolkits-Documents/ViBox-Quick-Drop-datasheet/ta-p/3507939) and found out that "Disable code" could easily be adapted to what we all wanted.

 

Of course, you need to provide data for case selector and case names when replacing Disable Diagram.

wiebe@CARYA
Knight of NI

The other way around would help too.

 

But at least we can replace an in place element structure with a while loop! /S

Zieleslaw
Member

@ wiebe@CARYA have you tried using my package? It replaces Case Structure with DDS too. Maybe you missed my comment, as it appeared right before yours.

wiebe@CARYA
Knight of NI

I appreciate your effort on the plugin, but I'm still aiming for NI to implement this...

 

And no, I didn't read that message too thoroughly 😋.