LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filename conventions ("open/create/replace.vi")

In the old days everybody tried to use filenames containing only alphanumerics and underscores ("_"). The MS came up with "do what you want" filenames and left the handling to the developers. A long time the old conventions were still used - especially by professionals.
What strikes me oddly is that even NI stopped thinking about that stuff. Take the vi "open/create/replace.vi" from the vi.lib\file.llb. What are you supposed to to with that on POSIX-Systems (Linux, Solaris, ...). Even NI's own VIs (like the Librarian Functions, eg vi.lib/Utility/libraryn.llb/Librarian Path Location.vi) can't handle that.

So here are 2 questions:

1. is there a way to escape special characters like '/'? I have tried the UNIX-way (escaping with '\' but that does not work in paths)
2. Can't we all stick to the old rules? Even blanks can be tough to handle (but we learned to live with that), putting slashes in filenames should be fined! So, next time you put a '/' in one of your filenames think about cross platform compatibility and use some other character (like underscore '_'). And finally, if you just can't leave it, buy me a beer everytime you use '/' and I will stop griping...

-DB
Message 1 of 6
(3,152 Views)
Hello,

I'm sorry I can answer your questions but I fully agree with you !! and would be interested in any answer..

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 6
(3,144 Views)
Personally, I've made a copy of the really offending VI using underscores and saved it in the same LLB.  This way it shows up nicely on my menu.  Additionally, I've changed the original icon to one with a nice big red X through it to remind me to NEVER use it.

Sorry NI, but the "Open/Create/Replace" thing is a nightmare.

Shane.

Message Edited by shoneill on 02-09-2006 02:34 PM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 3 of 6
(3,133 Views)

Yup, whoever named that VI "Open/Create/Replace File.vi" and stuck it in an LLB was obviously not looking toward the future.  However, that VI probably came into existence when I was in high school, so I have no idea who did it.  Thankfully, we nixed that VI in LabVIEW 8.0...it's been replaced with a built-in LabVIEW function.

-D

0 Kudos
Message 4 of 6
(3,100 Views)


@shoneill wrote:
Personally, I've made a copy of the really offending VI using underscores and saved it in the same LLB.  This way it shows up nicely on my menu.  Additionally, I've changed the original icon to one with a nice big red X through it to remind me to NEVER use it.


This is a good idea but I'm not really sure if this is possible in LV v7.1
 
I can add the red X to the offending icon and save it that way so that it now appears in the function palette that way.
 
I can also save a renamed copy of the VI to C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\Utility\file.llb\Open_Create_Replace.vi but I cannot find a way to make this new copy appear anywhere in the "file I/O" function palette.
0 Kudos
Message 5 of 6
(3,094 Views)

Allowing spaces and slashes in filenames is only one of the many MS screw-ups.  I sure would like to meet the idiot that came up with this idea.

I usually rename these offending filenames when I can.  It is sad that NI joined the MS screwed-up bandwagon and created such filenames.

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(3,082 Views)