10-06-2018 02:49 PM
This problem is illustrated at 1:30 of this video.
If the output of a VI is a cluster containing a class, a linking problem occurs.
I tried to reproduce the problem in the simplest way. I uploaded 3 files (LabVIEW 2016 format) with this post:
So Class 1 is simply an empty class.
"Output Class-Cluster.vi" creates a cluster containing Class 1 and outputs it as an indicator.
"Use Class-Cluster.vi" uses the output of "Output Class-Cluster.vi".
So, if you open any of the two VIs, no problem.
If you import "Output Class-Cluster.vi" in a blank VI that is not in a project, the VI breaks. The reported error is blank. As shown in the video, you can create a project, add the calling VI to the project when prompted, then create a cluster constant, and the problem is fixed. You can also close the VI, reopen it, force a re-compile and it should be fixed. A simple force recompile does not work.
If you import "Output Class-Cluster.vi" into a blank VI that is already part of a project, the calling VI breaks and the only way I found to fix it is close the project and reopen it.
I reproduced the problem with LabVIEW 2016, 2017, and 2018.
Am I the only one having that problem? Is there a simpler way to fix the linkage? Is there a way to permanently fix the linkage in "Output Class-Cluster.vi"?
Any information about that problem would be appreciated.
10-08-2018 02:44 AM
I'd say most VIs are created in a project nowadays. So either nobody noticed it, or if they did created a project and let it go...
LabVIEW Programming ((make LV more popular, read this)
10-08-2018 07:05 AM
Using a project helps but until you save and reopen the project (and possibly force a recompile), the calling VI is broken and the block diagram looks like this: