LabVIEW Idea Exchange

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

Smart autocorrecting autoindexing

Status: New
Sorry, I thought this idea pertained to wrapping the code with a loop after creating the wires, and not before. I'll move the idea back to "New".

Tunnels for FOR loops are autoindexing by default. Sometimes this is not the correct option for very obvious reasons and we get a broken wire.

 

The diagram editor should be smart enough to try the "other" option (e.g. no autoidexing) if a broken wire results. If the other option succeeds without a broken wire, it should be used automatically. Maybe the tunnel could "glow" for a few seconds with a small option box (similar to e.g. when pasting into word: keep formatting, text only, etc) that would disappear after a while where we can click and overwrite the automatic handling.

 

The image shows two wires that would be a candidates for autocorrection of the indexing option. In both cases, LabVIEW should disable indexing automatically to avoid broken wires.

 

If both options result in a broken wire, nothing should happen, as before.

 

(Similarly for while loops. e.g. if I wire a scalar across the boundary to an array indicator, it should autoindex.)

 

3 Comments
Rob_Calhoun
Member

I support this on the input side. I don't like it as much on the output side, because in most cases the output of a for loop should either be an array or a value projected by a shift register, like this:

 

 protect.png

 

I think it's ok to have to force the programmer to manually select "Disable Indexing" to indicate that you really did want to do this and that you know you're going the default value for the type when the loop executes zero times.

Darren
Proven Zealot
Status changed to: In Beta
 
Darren
Proven Zealot
Status changed to: New
Sorry, I thought this idea pertained to wrapping the code with a loop after creating the wires, and not before. I'll move the idea back to "New".