LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Max length of VI file paths and file names

Hi,

Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.

Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
LV on?

Sincerely,
Mattias Ericsson
0 Kudos
Message 1 of 5
(5,169 Views)
Mattias,

I can't find the exact information of the limits of filename lengths in libraries in LabVIEW, but I am pretty certain it is 255 characters, independent of platform.

Why do you need such long filenames. There has to be a way to get your filenames to a reasonable length. I would consider this as your solution, making shorter filenames that is.

If you contact NI, they can tell you the exact limit for filenames in libraries. I believe it is independent of platform. However; I know for certain that non-library filename length limits (system) are based on the platform.
0 Kudos
Message 2 of 5
(5,169 Views)
"Mattias Ericsson" wrote in message
news:506500000008000000833F0000-1012609683000@exchange.ni.com...
> Hi,
>
> Is there a maximum allowed length of VI file paths and file names in
> LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
> a LLB and LabVIEW crashes each time. I have also tried to copy the VI
> from the LLB to a temp folder with the Librarian VI, but LabVIEW
> crashes as well. The total length of the file path is around 260
> characters and I strongly suspect the file path length in combination
> with LLB because when I use a shorter path the problem disappear. If I
> use a long path without LLB (just regular VIs) a warning appear
> "Invalid file name" instead of LabVIEW crashing.
>
> Does anybody know the solution to
this problem or must I use shorter
> filepaths? Perhaps it depends on which platform I am running LV on?

I believe windows has a 255 character pathname (file+path) limit. We once
had that problem because we had a long filename and a longer pathname.
Moved the directory up a couple levels and problem solved.
0 Kudos
Message 3 of 5
(5,169 Views)
Just to note. LLB filename length is NOT a factor of the platform. The LLB was created by LabVIEW to accomodate long filenames and odd character useage to allow compatability of Windows to Macintosh filename conventions. LabVIEW was first available for the Mac, and at that time, filename length limits for Windows, in their infinite wisdom, was 8 characters (gee, do I ever remember trying to figure out how to name files...).

Today, the LLB is fast becoming obsolete. Nevertheless, the filename length (I cannot confirm the limit for LabVIEW LLBs) is independent of platform.
0 Kudos
Message 5 of 5
(5,169 Views)
Misc Details -- I dont know if you can use them with labview??? MAX_PATH is either 255 or 260 depending on what version of windows you are running. also, in regard to extended file lengths:

from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fsys_7qwj.asp

Process a path as a null-terminated string. The maximum length for a path, including a trailing backslash, is given by MAX_PATH.
The Unicode versions of several functions permit paths that exceed the MAX_PATH length if the path has the "\\?\" prefix. The "\\?\" tells the function to turn off path parsing. However, each component in the path cannot be more than MAX_PATH characters long. Use the "\\?\" prefix with paths for local storage devices and the "\\?\UNC\" prefix with path
s having the Universal Naming Convention (UNC) format. The "\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\bill_g_1\hotstuff\coolapps".
0 Kudos
Message 4 of 5
(5,169 Views)