04-27-2013 12:59 PM
So, is the problem solved?
Right now all you do is use the file dialog to select an existing file or create a path for a new file. You never actually create or open whatever path you generate with the file dialog.
04-27-2013 01:02 PM
i think i did everything wrong.
Can you explain how to do?
04-27-2013 01:15 PM
How to do what?
You still haven't said or shown what you are trying to do with this filepath after getting it from the file dialog. You said "I can't create a new file", but nowhere have you even attempted to create a file. Nor have you told what you are trying to do with this file once you open it.
04-27-2013 02:15 PM
Everythink went wrong..
Sorry for the mess i did.
Let me explain you from the beginning.
I am doing a VI for my students to demonstrate the use of file path.
When we use "Open/Create/Replace File" dialog, we have to write the extension of the file else it would be saved as .file extension.
Now What I want is to get that extension automatically.(.xls or.xlsx)
The remaining part in the case structure is just for demonstration to my students.
04-27-2013 03:00 PM
So you are looking for a file path, you're looking for that file extension. Everything you've done so far gives you that.
Now what is it you want to do next? Do you actually want to create a new file? Open an existing file? Replace an existing file? If yes to any of these questions, what do you want to do with that file? Read from it, write to it? WHAT???
04-27-2013 03:19 PM
Create new file.
After creating I will write to it (through excel reports).
04-27-2013 03:23 PM
So then you probably need to use the Open/Create/Replace File function that is located on the File I/O palette.
Make sure you open the context help and pay attention to all of the inputs. Right now your VI doesn't show you using this function.
04-29-2013 08:48 AM
The dialog VI only gets a path for you. It doesn't do anything with any files. As Ravens said, use the Open/Create/Replace File function. There is an operation input. Set that to "Open or Create" (it is an enum).