From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
kewal

Handle invalid characters in filenames during build

Status: New

NI LabVIEW allows VIs with invalid characters such as "?" in the filename inside an LLB file as shown below:

LLB.png

 

However when it comes to building a Source Distribution / TestStand Deployment that uses this file it returns an error as shown below:

Build Error.png

 

This inconsistency within LabVIEW is quite frustrating where one part allows invalid characters in the filename and another part will return an error. Since the invalid characters are allowed in VI filenames within LLB files I would suggest that the LabVIEW build tools also handle them graciously.

 

During the build process it could quite easily rename the file "pi40iv Can Connect Channel?.vi" to "pi40iv Can Connect Channel_.vi"  and link the VIs that use it to the newly renamed file. The build tools already contain the ability to rename files by adding prefixes so something like this would not be that difficult.

 

While people may argue to just rename the filename within the LLB and be done with it, the fact that the LLB is a perfectly valid file in the Development Environment but causes problems when trying to do a build is a problem that should be rectified.

 

The LLB in question is one that is not developed by us but is part of a Pickering Driver Installation obtained from the following location:

http://downloads.pickeringtest.info/downloads/drivers/IVI/

Therefore every time we install a new version of the driver we would need to rename the VI filename within the LLB file.

3 Comments
wiebe@CARYA
Knight of NI

We recently had a similar problem where a project (on Windows) had characters that are not allowed on Linux. When deploying to cRIO, there where no errors, but it didn't work either.

 

+1 for handling this properly.

JKSoerensen
Member

There is a tool builtin, in the undocumented part of the vi.lib presented by Darren Nattinger in this slide deck.

https://forums.ni.com/t5/Hidden-Gems-in-vi-lib/Hidden-Gems-in-vi-lib-pptx/gpm-p/3502591

 

More specifically the bottom line on slide 24 is what you need to detect the faulty character in the file name.

 

It could and should be handled by a pre-build step by the programmer of the IVI driver.

Keep in mind that the presented slides is a delve into the undocumented part of the "vi.lib" so there may be dragons ahead. 

BR 

Jesper

GCentral
CTD + CLD + Pythonista
kewal
Member

Sorry for the very late reply. I had not been on the forums for quite some time it seems.

 

Thanks for the suggestion Jesper. That does seem like the best solutions to the problem for the moment, as that still allows the developer the use drivers as they are provided without having to rename them during development. Horray for Hidden Gems!

 

However I still think if such filenames can be created in LabVIEW and it treats them as valid then its own build tools should have that functionality built-in to rename these files for the particular platform the build is created.