LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Petru_Tarabuta

The Replace Array Subset node right-click menu should contain "Add Element" and "Remove Element" options

Status: New

Idea Part 1: The menu that appears when right-clicking an input of the Replace Array Subset node should contain Add Input and Remove Input options.

Idea Part 2: The QuickDrop Remove and Rewire tool (Ctrl + Space, Ctrl + Shift + R) should remove unwired inputs of the Replace Array Subset node.

 

2 (edited).png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This would be similar to the menus of several other well-loved nodes, such as the Build Array node.

 

Real-world example

The other day I wrote the following code:

1.png

 

 

 

 

 

 

 

 

 

 

 

Initially all the inputs of the Replace Array Subset node were wired. Then I realised I had made a mistake, and needed to remove the third-last pair of wires. I deleted the wires. So far so good.

 

I then selected the node and pressed Ctrl + Space, Ctrl + Shift + R to execute the QuickDrop Remove and Rewire tool, in the hope that it would eliminate the unwired input. It didn't. I then right-clicked the input, hoping to manually select Remove Input. That option didn't exist.

 

The only option I had was to manually disconnect the last four wires and reconnect them one input above, followed by removing the last input by dragging the bottom edge upwards.

 

Having to manually disconnect and reconnect wires was a little disconcerting. I wondered: what would have happened if I had made a mistake with say the second input, instead of the third-last input? A lot more manual wiring would have had to be redone.

 

Notes

1 Comment
raphschru
Active Participant

This is even weird it is not implemented by default, because the "Replace Array Subset" node belongs to the class "GrowableFunction", which has VI Scripting methods "Resize.AddChunk" and "Resize.RemoveChunk". So having a generic code that would work for all growable nodes wouldn't be difficult to do.

 

I would say, a more general idea could be to implement it for all growable nodes at once.