02-23-2022 10:39 AM - edited 02-23-2022 10:40 AM
Hi all,
does anyone know the difference between these two objects?
The code creates two While Loops that look exactly the same to me.
Thanks in advance.
02-23-2022 11:35 AM - edited 02-23-2022 11:41 AM
When I run your code I see two while loops that are in different locations and have different sizes. Additionally, the different class inputs of GObject vs. Generic (the parent of GObject), I believe, simply affect the type of refnum output; for example, wire a property node to it and you will either get a Generic or a GObject property node. The Generic and GObject refnums can be typecast to the other. They are interchangeable; style #1 doesn't require Generic nor #2 GObject. I agree, they both have Class ID 16435 and Class Name "WhileLoop". I suppose what you really want to know is the functional difference between a style "While Loop #1" vs. "While Loop #2". Unfortunately, I don't know that either.
02-23-2022 12:13 PM
Yes that is my question. The size and position are different because I coded that.
But why is there While Loop #1 and While Loop #2 in the Enum.
Doesn't make sense to me.
02-23-2022 01:26 PM
There is no difference between them. My guess is that in older (way older) LabVIEW versions the different options might have been used to create loops with:
1. Different stop conditions (stop on true vs. stop on false), or
2. One with a stop button already wired to the stop terminal, and one without.
But those differences were at some point removed, causing the two scripting options to generate the same object. Again, that's just a guess.
02-23-2022 02:48 PM
I would inspect the auto-grow property of each before I claimed them to be identical. Beyond that. While loops switched from defaulting to stop on TRUE between 6.i and 7.1. I misremeber how 7.0 did them I was too busy having fun with7.0
02-23-2022 02:50 PM
@JÞB wrote:
I would inspect the auto-grow property of each before I claimed them to be identical.
Yup, I checked all the properties, including private hidden flags. They're identical.