LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error code file and deployment on target

I was experimenting with the Tools>>Advanced>>Edit Error Codes and added a couple of error codes/text.  When I went to save it, I tried changing the default directory and received the message (shown in attached bitmap).  I'm wondering about deployment onto the target and if the error code file has to be located in the C:\Program Files\National Instruments\LabVIEW 8.0\user.lib\errors folder at the target?
0 Kudos
Message 1 of 7
(3,169 Views)
I'm not sure if you really have to, but when creating an application, you should save the error codes file in the user.lib\errors subdirectory which should be located in your application directory.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 7
(3,160 Views)
Hello mrbean,
 
When you save the custom error code file, it defaults to the user.lib\errors folder, as this is where the LabVIEW development environment will look when loading custom errors. This is mostly documented here:
 
 
There is one paragraph of particular interest:
 
When building an executable (EXE) or shared library (DLL) with the Application Builder, make sure to add the custom error file as a support file (under the Source Files tab). For an executable, the custom error file will be saved in the <executable destination directory>\user.lib\errors directory. For a shared library, the custom error file will be saved in the National Instruments\Shared\LabVIEW Run-Time\<version>\Errors directory. When distributing a shared library, make sure to install the custom error file in this directory.
 
This is true for LabVIEW 7.x and earlier. In LabVIEW 8.0, the build specification in the project has a check box "Copy error code files" that will accomplish the same thing for you when you are ready to distribute.
 
Hope this helps!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 3 of 7
(3,146 Views)
Hi Charlie
 
In LV8.0 if the check box "copy error code files" is checked, LV unfortunately does not know which files should be copied and which not. This could be an improvement for future versions.
Now I include the necessary error files in the project and do the job on my own.
 
 
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 7
(3,142 Views)
Hi becktho,
 
That's good feedback. I agree that there is more we could do here to improve usability & I can definitely pass that feedback along.
 
Thanks!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 5 of 7
(3,129 Views)
While talking about improvements, there are two additional points I have to mention:
1. The option "Copy error code files" is available in at least two build types (I just used App.-Build and Installer-Build up to now). Is there a difference? Or could these be combined somehow?
2. It should be possible to copy existing build specifications.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 7
(3,121 Views)
Hi becktho,
 
There is no significant difference between the two options in the two different build specifications. The Installer build should place a copy of the custom error code file in the "Shared\LabVIEW Run-Time\8.0\errors" directory. And though not explicitly documented, the EXE builder also does the same.
 
However, the EXE (App) builder will only copy the error code file on the development computer during the build process -- it's not embedded in the exe. What this means is that if you do not build an installer you would have to manually copy over the xxx-errors.txt file to a target machine yourself with the executable. So, the only advantage I see to having the option there for the EXE builder is to test an EXE on your development machine before you build an installer & distribute.
 
I like your idea of copying an existing build spec -- you can file a product suggestion on that as well if you like.
 
Again, thanks for the feedback!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 7 of 7
(3,111 Views)