LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File dialog trimming the default name

Solved!
Go to solution

Hello everyone,

I recently migrated from LV2011 to LV2012 and I have an issue with the File dialog Express vi. It seems, that in LV2012 the Windows dialog that appears after invoking the File dialog, trims the default name to 14 characters (or rather moves the string to the left so first x characters are hidden). Please see attached screenshot and VI. It was OK in LV2011 (have tested the same code yesterday on different PC with LV2011). Is there any workaround or solution? It is a minor bug, but since my application is distributed for a paying customer it rather bothers me 😞

Download All
0 Kudos
Message 1 of 33
(6,259 Views)

Hi Martin!

 

 This is a known bug in LV 2012. What I suggest to use as a workaround is using the old file creator VI. You can find that in <LabVIEW Directory>/vi.lib/_oldvers/_oldvers.llb/Open_Create_Replace File.vi

It has the same functionality as the Express VI. I made a little example code:

file_open_old.jpg

and it worked fine. I hope this helps.

 

Kind regards:

 

Andrew Valko

National Instruments

 

Andrew Valko
National Instruments Hungary
Message 2 of 33
(6,216 Views)
Solution
Accepted by topic author martin.zmrhal

Thank you for your answer Andrew!

 

Your VI did not exactly help me with my code, but it helped me find the way :). When I used your VI, the behaviour was unfortunately exactly the same as with File dialog. But I have noticed that it works correctly only when I select "create" in the function input terminal (with "create or replace" or anything else I experienced the string trimming).

 

Then I have tried changing the setting of File dialog express VI from "New or existing" to "New" and with this setting even the File dialog works just fine (and there seems to be no difference between "New or existing" and "New")!

 

screenshot.png

 

So problem is solved, thank you once again!

Message 3 of 33
(6,185 Views)

Glad I could help (albeit indirectly Smiley Happy )

Cheers.

 

Andrew

Andrew Valko
National Instruments Hungary
0 Kudos
Message 4 of 33
(6,179 Views)

Hi,

I've notice the same behavior using the File Dialog under Labview 2012 12.0f3 (32-bit)  and Windows 7 Pro 64-bit SP1.

I've also notice an other issue when trying to save on the "Desktop" using the default name.


See the attached vi.


The vi shows 2 issues:

1- A long default name will appears partially hidden in the dialog when executed.

2- When changing to some directories (including Desktop) and trying to save leaving unchange the filename (default name),
the browser jump somehere else ( to the "Start Path" or the previous selected folder)
Similar to the following forum threads (using labview 😎
http://forums.ni.com/t5/LabVIEW/File-Dialog-can-return-incorrect-path-when-selecting-Windows/td-p/95...
http://forums.ni.com/t5/LabVIEW/quot-File-Dialog-quot-Express-VI-returns-the-wrong-path-when-the/td-...

 

Using the old file creator VI as suggested by ValkoA shows the same behavior.

The issues don't occur if using "New" instead of "New or Existing" (as suggested by Martin).

However, using the "New" option when the file already exists will prompt a message to either continue or cancel. In some cases, this is not desirable.

0 Kudos
Message 5 of 33
(6,100 Views)

Sweet! That was so annoying, but this work around is perfect.

0 Kudos
Message 6 of 33
(6,016 Views)

I'm seeing same off center file name behavior with Exsisting files selected (LV2012).

Odd that a mouse click on another VI causes file name to pop into correct left justified alignment.

 

0 Kudos
Message 7 of 33
(5,769 Views)

It's still in LabVIEW 2014.  😞

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 8 of 33
(5,646 Views)

To be clear.  This is not a LabVIEW bug.  It is a Microsoft Windows bug.

 

See http://forums.ni.com/t5/LabVIEW/Saveas-Dialog-hides-filename/m-p/2872084#M835546

0 Kudos
Message 9 of 33
(5,639 Views)

It doesn't matter who's fault it is. It looks damn unprofessional.

0 Kudos
Message 10 of 33
(5,615 Views)