LabVIEW Idea Exchange

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

Support Assignable Tracks in Diagram Cleanup

Status: New

We often use multiple instrument APIs in parallel (with occasional sync points). It would be nice if diagram cleanup could recognize that and not interweave them.

 

Here's a quick and dirty merging of examples from Switch, DC Power, and DMM to illustrate:

 

Each API is aligned on its own horizontal line. The error cluster is used for sequencing.

Capture.PNG

This could benefit from some automated squeezing. However, Diagram Cleanup flattens it to a more compact, but argueably less readable form:

Capture2.PNG

If track assignment wasn’t automatic (maybe using the instrument descriptor line), perhaps the user could ctrl-click a set of Vis and assign to a track (track 1 for Switch; track 2 for NI-DCPower; etc.). Then diagram cleanup would place each track on a different horizontal line. If you click and drag a member of an assigned track, the whole track slides up and down together (along with dedicated constants, controls, indicators, etc.), maintaining relative positions. 

 

We spend a lot of time manually wiring our diagrams to keep the APIs in separate tracks. Diagram cleanup is awesome for small pieces or API-homogenous Vis. If it could keep multi-API Vis clean, it would make our code development and documentation more efficient.

3 Comments
SnowMule
Active Participant

Or what if there were a few "cleanup" styles, and clicking the diagram cleanup button cycled through them?

 

Like the first click gets you a traditional, error-line-straight, cleanup

second click snaps to task(s)-lines-straight cleanup style

third click "sees" string/enum/dbl/int/ wires that stretch across

fourth click straightens out arrays/references

5th click takes you back to "the way it was"

 

That might help make sense of code you didn't write, if it's spaghetti-ish, just to see it in a different style.

 

I will also comment that examples like OP's are why I don't use full diagram-cleanup often. 

Yamaeda
Proven Zealot

Very nice idea SnowMule! Maybe you could set your preferred one in the settings. Maybe some more dynamic/priority settings, like "Prioritize straight error wire", "Prioritize straight ref wire", "Prioritize straight wires" (The current reduce bends seems overridden by the wire distance setting, which is quite contrary to how i organize it)

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
auspex
Member

One thing that might work here is a way to fix nodes in place. If the nodes at the edges of the For loop were "locked", the rest of the cleanup might align to them.