LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lock diagram parts


@Pierre_F  a écrit

@JÞB  a écrit :


Block diagram objects cannot be locked to a specific location.   They can be excluded from block diagram cleanup with a Right-Click option which will prevent them from moving relative to each other while cleanup runs.  This essentially Groups those objects but only for cleanup. 

 


After a little more practise, I understand what you mean.

I was right clicking on the functions blocks/commands/constants/indicators to find "exclude from cleanup" after realizing that this option was only present on diagram structures: For thoses ones, it works very well.

About isolated functions, commands and wires, I'm including them in a "random diagram" (here below disable) and right click "exclude". then I remove it. It's not optimal, but it's sufficient.

 

Pierre_F_0-1653927906837.png

 

 

 


@Pierre_F  a écrit :

@JÞB  a écrit :

Lables and Captions may be locked to their owning object (again, with a Right-Click. )  The exception being wire segment lables, they sort of Float along the segment while stretching or changes that add or remove wire bends.



bad point! Strangely, when I move the label at the right (for example) then right click on a command label ->"lock", after clean up, the locking of the label is ignored and its position comes back to left up. 😞

 

Pierre_F_1-1653927130866.png    after "locking label" + "cleanup"---->>>>Pierre_F_0-1653926975961.png

 


@Pierre_F  a écrit :

@JÞB  a écrit :


Comments may be Attached to any object or node with an attachment arrow, cleanup may move them relative to each other.



no, it don't. the attachement arrow doesn't preserve position between label and "arrowed" object.

 

Pierre_F_0-1653927080742.png   after "cleanup" ------>>>>           Pierre_F_1-1653927010617.png

 

 

is there an option to set?

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 11 of 17
(854 Views)

@altenbach wrote:

As a rule of thumb:

 

If diagram cleanup improves the look of your code. It must have been really (really!!!) bad before!

 

(I never ever use cleanup on my own code. I use it exclusively on bad code found here in the forum. 😄 . My programs are well structured from the beginning as they should be.)


When I create code, it's often spaced out and somewhat messy, but after I get it working, I always clean it up (manually) (if only I could get my cow-orkers to do that).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 12 of 17
(805 Views)

@altenbach wrote:

As a rule of thumb:

 

If diagram cleanup improves the look of your code. It must have been really (really!!!) bad before!

 

(I never ever use cleanup on my own code. I use it exclusively on bad code found here in the forum. 😄 . My programs are well structured from the beginning as they should be.)


Sometimes I use diagram cleanup tool for small subVIs I created from existing code because I am too lazy to realign everything by hand.  (It still looks bad, but better than nothing.)  Oddly enough, the more complicated the resulting block diagram is, the more likely I am to align everything by hand.  But that's not too often because my subVIs tend to be very simple.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 17
(799 Views)

I have never looked at the tuning options, but the most damaging cleanup effect is that well aligned and delineated horizontal "trains" of code anchored by shift registers tend to completely mess up and go all over the place, zigzagging across. I am even bugged by the iteration terminal getting slammed into the lower left corner instead of where it is normally, i.e. a few pixels in.

0 Kudos
Message 14 of 17
(768 Views)

@altenbach wrote:

I have never looked at the tuning options, but the most damaging cleanup effect is that well aligned and delineated horizontal "trains" of code anchored by shift registers tend to completely mess up and go all over the place, zigzagging across. I am even bugged by the iteration terminal getting slammed into the lower left corner instead of where it is normally, i.e. a few pixels in.


Occasionally I feel like writing my own BD cleaner.  But I just sit down and close my eyes until the feeling goes away.

-----

What bugs me is that when I select "Remove and Rewire", it rearranges (messes up) wire segments that it has no business touching.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 15 of 17
(760 Views)

@Pierre_F wrote:



bad point! Strangely, when I move the label at the right (for example) then right click on a command label ->"lock", after clean up, the locking of the label is ignored and its position comes back to left up. 😞


The locking of a label/caption does not prevent it from being moved to its default position programmatically, via diagram cleanup or via the CTRL+T Quick Drop Keyboard Shortcut. It sounds like you'll want to change those default positions within Tools > Options.

 


@Pierre_F wrote:

@Pierre_F  a écrit :

@JÞB  a écrit :


Comments may be Attached to any object or node with an attachment arrow, cleanup may move them relative to each other.



no, it don't. the attachement arrow doesn't preserve position between label and "arrowed" object.

 

Pierre_F_0-1653927080742.png   after "cleanup" ------>>>>           Pierre_F_1-1653927010617.png

 

 

is there an option to set?


You may have misread. They said "cleanup may move them relative to each other", which it did. There is a Description property for each control-class object that you could possibly use to document your code in a more inline fashion.

 

The more often you end up using Diagram Cleanup as part of your workflow, the more often things like this are going to bite you over and over.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 16 of 17
(757 Views)

Here's is a comparison what the cleanup button would do to one of my simpler subVIs that solves some ill-posed linear algebra problem. (zoomed to 25% to keep some code privacy :D)

 

Just look at it!!!! FOR loop with tons of whitespace in upper left! 100x more wire bends! hard to follow the flow! Now much wider than  than my 2560x1440 screen! terminals all over the place!

 

Undo!!! Undo!!!!

 

altenbach_0-1654110493568.png

 

Message 17 of 17
(748 Views)