10-21-2024 01:24 PM
Has anyone seen anything like the following behavior, and furthermore know of a solution. I've attached a couple of images to help explain. The first one shows the problem:
The 'False' constants and the string constant ('Active') have shifted relative to the other components. Here's what it did look like:
Here's another example from the same project:
The array indexing constants have moved, as has the string constant.
This seems to happen fairly randomly, i.e. I save the project and then open it later and sometimes things have shifted like this and sometimes not. It does not seem to be the entire project either, some constants appear to unafected while others nearby are shifted...
Is there a setting I'm missing? I'm at a bit of a loss to understand what is going on.
LabVIEW 2021 Base Development System
Solved! Go to Solution.
10-21-2024 01:30 PM
Seems unusual:
A few things to check:
10-21-2024 02:18 PM - edited 10-21-2024 02:19 PM
This looks to me like what happens when you use ctrl + mouse drag to open up room in a case structure. It moves stuff in the other cases as well.
Edit: also, shift + ctrl + mouse drag to remove space.
10-21-2024 03:18 PM
Thanks for the rapid response!
This is only happening on my development machine, and I don't think the fonts are anything different than default. however, i think you might be onto something with autogrow. (I don't know how this works btw). My default setting is off (I think)
HOWEVER, when I look at nested structures (right-click to see autogrow status), I see the following:
This has not been selected deliberately and I'm not sure why some have it turned on and others not. Can you explain what autogrow does and why some structures have it enabled while others don't?
10-21-2024 03:21 PM
A further clue maybe:
It looks like Autogrow is enabled for pretty much everything (while loop, for loop, event structure, case) EXCEPT for case structures fed by an enum.
10-21-2024 03:29 PM
I hate autogrow so much I call it "auto-groan".
10-22-2024 04:47 AM
@MarkTTHSAS wrote:
Can you explain what autogrow does and why some structures have it enabled while others don't?
Autogrow prevents you from placing items outside the visible border of a structure by increasing its size (similar to a ctrl+drag) and prevents you from shrinking a structure so it hides code. It's on per default in the settings. Some hate it, i often find it useful but sometimes it messes things up.
Try placing e.g. two nested cases and shrink the outer or increase the inner outside the border with it on and off.
10-22-2024 07:28 AM
OK. I see what Auto grow does. Are we saying that some elements are 'pinned' (for want of a better word) to the block diagram (e.g. constants) while others are free to move with the autogrowing structures?
10-22-2024 07:48 AM
I think I have worked out why I'm getting the behavior I originally posted about. I don't think it has anything to do with Autogrow (although it has been interesting learning about it!). I think when one does a resize inside a case structure, variables and constants in other cases show different behavior. Here's an example. I just put a grid of Boolean constants with some local variables placed around the grid:
I then switched case (to show the false case) and did a 'ctrl-click and drag' to increase the size of the case structure. The drag started in the area of the boolean grid shown approximately by the arrow.
As you can see, the local variables move, but the constants stay put.
Another example:
This is exactly what I am seeing, but the question remains as to how to prevent it...
Thanks for all your help so far!
10-22-2024 09:05 AM
That's a bit strange, all cases should add area from the same point.
Can confirm in LV2019!
Adding space in the middle yields the expected result
Adding space in the False case moves the True's Index array as expected, but the constants stay!