09-28-2020 08:09 AM
Here's a really nasty LabVIEW Quirk:
09-28-2020 08:20 AM - edited 09-28-2020 08:23 AM
.Reproduced in LV20, 64 bit...
@paul_cardinale wrote:4. Save and close the VI
This asked to save the type def as well, as I didn't save it before (as this wasn't instructed 😁). It still reproduced though.
09-28-2020 11:55 AM
LV 2016 also. I believe that, since the property node is an implicit one, LabVIEW thinks you just deleted the control so the implicit property disappears along with it. I guess the typedef doesn't get "apply changes" to the control, so the implicit property node is orphaned and gets deleted.
09-28-2020 01:10 PM
You can even see it in real time. Leave the VI open and change the typedef to a control (and apply changes). The property node disappears before your very eyes - POOF! - it's gone.
09-28-2020 01:23 PM
Interesting edge case. I have never felt the need to convert a typedef back to a control.
Typically I would just "right-click...disconnect from typedef" and the property node is retained.
09-28-2020 01:54 PM
@altenbach wrote:
Interesting edge case. I have never felt the need to convert a typedef back to a control.
Typically I would just "right-click...disconnect from typedef" and the property node is retained.
We have a lot of custom buttons that always should have been controls instead of typedefs. The link is unnecessary and just creates extra stuff on our deployments. I switched them from controls to typedefs then lots of stuff broke. I'm trying to think of a way to fix things without going back to typedefs; so far no luck.
09-28-2020 02:08 PM
How about finding each instance and disconnecting it? Then, only after all the typedefs have been disconnected, make the typdef a control?
09-28-2020 02:24 PM
I found that this will fix a VI, if it hasn't been opened:
But this code makes some assumptions that may not be true. I'll have to refine it before I shotgun our code.
09-28-2020 02:57 PM
On second thought, I'll probably do something like this:
09-28-2020 04:21 PM
@paul_cardinale wrote:
On second thought, I'll probably do something like this:
- Make sure the test engineers have their latest code checked in.
- Revert the buttons back to the typedef'd versions
- Write and run a script that:
- Scans all our code for instances of those buttons
- Checks out the owning VIs
- Disconnects the typdefs
- Checks in the the VIs
- Unrevert the buttons to the non-typedef's version.
- Tell the test engineers to sync.
Oh, gosh - so kind of what I suggested on a grand scale... whew!