LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7 at Get LV Class Default

Solved!
Go to solution

I recently finished a program that runs a test stand. The uncompiled code (the .vi before I make it an .exe) works fine. However, when I compile the code into an .exe, I get an error:

 

Error 7 occurred at Get LV Class Default Value.vi

 

Possible reason(s):

LabVIEW: File not found. 

 

I have also attached a picture of the error message.

 

I went through and troubleshooted the entire VI, and narrowed it down to a subVI that is responsible for getting values from the program and printing them on to a label. I have attached this VI also. I also just compiled that code (the label VI) to see if that was the problem, and it gave me the same error message. 

 

I searched the forums for this issue, and found this knowledge base article: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O6PSAU&l=en-US

 

I followed the steps it listed and it still will not work. I have also attached a picture of the project file. I have also searched the forums for the same error and found nothing that works. 

 

I am completely stumped. I have no idea how to proceed from here. I am using LabVIEW 2017. Any help would be greatly appreciated.

0 Kudos
Message 1 of 8
(3,198 Views)

You have manually added the class to your project and build spec? Can you, as a debug step, place the class constant in your Print with Template VI, and wire it to a 'Get LV Class Path.vi', and have the output path be displayed or logged so that you can compare it to the expected path returned by the error?

0 Kudos
Message 2 of 8
(3,165 Views)

Are you running the exe on the development machine?

0 Kudos
Message 3 of 8
(3,157 Views)

Is the executable running on the development PC?

 

Stupid forum gives me an error that it can't post, then an error I try to post twice in one minute.

0 Kudos
Message 4 of 8
(3,155 Views)

The path there looks long.  It's long enough that it might be over the 250-character limit (I'm not going to count).

 

Can you try putting your EXE in a short folder name, like K:\Test, instead of K:\blah\blahblahblahblah\blahblah\blahblahblahblahblah (version 098123)\blah\blah.exe ?  That will shorten the overall path.

0 Kudos
Message 5 of 8
(3,143 Views)
Solution
Accepted by topic author joshuab09

Your problem is not that the path is too long.  The path contains \C\Program Files\ in the middle.  LV is trying to find an absolute path located inside the EXE file.  You don't show the build spec so it's not obvious if you followed the instructions in the link you referenced, but I don't believe you did it right.

 

You needed to include the entire NIReport.llb file in your project.  LV is not smart enough to compile out the NI_Excel.lvclass if you only use Word.  The case structure still needs the HTML and Excel classes to compile.

 

Other things to try:

1. Compile the code on your C drive

2. Run the code on your C drive

3. The target machine needs the RGT license to run

4. New Report.vi is deprecated.  Switch to Create Report.vi

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 6 of 8
(3,137 Views)

You can add the Word and Excel classes as 'Always Included' files in your EXE build spec. This page has more info:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O6PSAU

 

Edit: Oh, I see you included that link in your original post. I'm surprised that you're still having problems after following those instructions. Adding the Word and Excel classes as 'Always Included' files has always fixed the issue when I've seen it in the past.

0 Kudos
Message 7 of 8
(3,129 Views)

Thanks for the reply! Point 4 was my my problem. I updated from LabVIEW 2017 to LabVIEW 2018 and replaced the New Report to Create Report. The VI executed with no problems. 

0 Kudos
Message 8 of 8
(3,085 Views)