Jump to content

Anyone else OCD about alignment and positioning in block diagrams?


Recommended Posts

That's totally OCD!

 

However, why the unnecessary bend on the Event Reg wire? Let me guess, it lines up with the top terminal of your VIs inside the case-structure?

Close: the output of the event structure and while loop lines up with Unregister for Events. I've started putting the event registration itself in Actor's class data so it can be unregistered in Stop Core. Now I can get rid of that bend!

Link to comment
I almost never run into Rolf's problem within knowing whether a wire is attached because I work hard not to have any wires going behind unconnected VIs - if it's touching, then it's attached.  Oh, and I don't mind triple-clicking.

 

It's not about wires going behind VIs without being connected; that is something I have done myself maybe 5 times in over 20 years of LabVIEWing. But seeing to which terminal a wire is really connected. Of course that may seem often unnecessary because of different and incompatible datatypes of the terminals, but can be a real gotcha when a VI has several datatype compatible terminals. And yes it is not as important in my own VIs since I know how I wired them, but inheriting VIs from someone else is always much easier if such rules have been followed.

Link to comment
Oh, now I notice that you mentioned functions.

I've done that on the front panel.  Say I have a hidden tab that I programatically change, but when it changes I want the controls that are between tabs to be in the same location so the change from one tab to the next looks seamless.  Never on a BD.

Link to comment
I'll see your scrolled-case-wires-don't-move and raise you my scrolled-case-VIs-and-controls-don't move. The empty string constants in this BD are used for aligning edges of nodes in the cases:

 

attachicon.gifUntitled.png

 

Yeah, I sometimes like to align functions inside multiframe structures too, so they are at the same place in all frames. But usually only if they do similar things and as form of meditation, while thinking about the rest of the algorithm. :rolleyes:

  • Like 1
Link to comment
Yeah, I sometimes like to align functions inside multiframe structures too, so they are at the same place in all frames. But usually only if they do similar things and as form of meditation, while thinking about the rest of the algorithm. :rolleyes:

I have the feeling some times that this is what takes up about 40% of my time programming LabVIEW......  Ctrl-Mousewheel is your friend here though.....

Edited by shoneill
Link to comment
Yeah, I sometimes like to align functions inside multiframe structures too, so they are at the same place in all frames. But usually only if they do similar things and as form of meditation, while thinking about the rest of the algorithm. :rolleyes:

 

Sounds very familiar :P

I do the same thing

Link to comment
I'll see your scrolled-case-wires-don't-move and raise you my scrolled-case-VIs-and-controls-don't move. The empty string constants in this BD are used for aligning edges of nodes in the cases:

 

Mind...blown

 

I may have to start doing this now.  I was still madly switching between cases and shifting things just so.

 

So this seems to be turning from a support group into an enabler...

Link to comment

Ok, support-side: the one that actually wasted my time (instead of allowing meditation, as Rolf mentions) was making sure all the wires had their bumps on the same side (scalar string, scalar path), smooth-edges instead of bumpy edges (1D array of string, path, etc), and on and on. BD's are usually small enough that "Horizontal Gap" doesn't come into play much anymore.

Link to comment

Oh I just thought of one.  Lets say I have three case structures aligned vertically.  Why is there not a "Minimum Size" or "Maximum Size" like there is for front panel objects?  I have these 3 case structures, all doing similar work in parallel, and I want them to align left, space equally vertically, and have the same size.  The only satisfying thing to do, is to set one the way I like then copy and paste it so all 3 are the same size.

Link to comment
Oh I just thought of one.  Lets say I have three case structures aligned vertically.  Why is there not a "Minimum Size" or "Maximum Size" like there is for front panel objects?  I have these 3 case structures, all doing similar work in parallel, and I want them to align left, space equally vertically, and have the same size.  The only satisfying thing to do, is to set one the way I like then copy and paste it so all 3 are the same size.

Been there.  I make a RCF Plugin to do that very thing for me.  I haven't ported it over to QD yet.

Link to comment
  • 2 weeks later...
  • 3 weeks later...

Love this topic.  I have been doing this since the first day I started programming in LabVIEW.  I am willing to bet 20% of my coding time has gone to perfecting my BD.  But I don't see it as OCD.  Just like text programmers will create elaborate function comment blocks using characters to make a pretty box around them and aligning the text inside, I see a well laid out diagram as a means of communicating the operation of the code efficiently.  I prefer to position things so the flow is as obvious as possible.  I never run wires under objects (unlike *SOME* frequent LAVA posters I know  :P ).  I stick to 4224 connectors but I will occasionally convert one to 4124 or 4114 to allow a connection to come in from either the top or bottom, if it makes the diagram cleaner.  And I do like to align object in multiple cases.  Usually you get this for free when you copy one case to make alternate versions but if it gets out of alignment, I will toggle back and forth to find the issue and nudge it back.

One thing I do that I am not sure others do is the wires entering and leaving the side terminals must approach and leave on the horizontal axis.  I never allow a wire to connect to the sub-vi from the top or bottom unless it is going to a central terminal.  The same goes for all structures. I never have wires enter or leave from the top of bottom.  I will add an extra bend in necessary to achieve this.

 

Embrace your OCD.  It makes you a better wire-worker!

Link to comment
I'll see your scrolled-case-wires-don't-move and raise you my scrolled-case-VIs-and-controls-don't move. The empty string constants in this BD are used for aligning edges of nodes in the cases:

 

attachicon.gifUntitled.png

 

That's not OCD, that's a fantastic way to ensure your syntax can be synthesized by a measly human.

 

CTRL+Scrolling through your diagrams, the human eye can handily diff similar cases.

 

I'd gladly inherit your code anyday, sir.

 

(I bet, you even understand why "Make Space" inside a structure is reserved only for Sinners)

Link to comment

I think we stick to much to the BD, where the FP also needs much more love :D

 

As I checked for new ideas in the Idea Exchange, I found an interesting one:

Check this link: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Match-widths-of-Label-and-Caption-input-fields/idi-p/2579739

I like this idea so much that I couln't help but giving it kudos

Link to comment
What about front panel clean up?  Just arrange everything like they are tied to the connector pane and stack unconnected items in the middle.  Often in subvi's I just want the left side stacked up in line with the error in and the right side the same with the error out.

Very often I will be working on a VI then get frustrated when the block diagram cleanup button is missing...only to realize that I was indeed on the Front Panel.  The good news is Jack already has an idea so I don't need to take the time to post it.

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/How-about-a-Front-Panel-Cleanup/idi-p/963556

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.