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

cancel
Showing results for 
Search instead for 
Did you mean: 

create a new text file

Solved!
Go to solution

Open/Create/Replace only seems to allow writing to an existing file, every time I try to type a new name in it's throws an error saying the file dosn't exist. See attached

0 Kudos
Message 1 of 9
(10,500 Views)

There's an "operation" input. Default is "Open", which doesn't create a new file. Create a constant to set the input to Open or Create.

OpenCreate.png

 

Press cntrl+h to see the Help window that gives you all the information you need about a subVI.

 

 

"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 9
(10,499 Views)

Also note that the Open/Create/Replace will not create the directory structure.  You should use Create Folder (in the File IO->Advanced palette) to create the folder you want to put the file in if the folder does not exist.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 9
(10,487 Views)

Sounds like a great solution except I can't seem to add that text to the constant see attached. Obviously doing something wrong

0 Kudos
Message 4 of 9
(10,483 Views)

@crossrulz wrote:

Also note that the Open/Create/Replace will not create the directory structure.  You should use Create Folder (in the File IO->Advanced palette) to create the folder you want to put the file in if the folder does not exist.


Oh, great will give that a try

0 Kudos
Message 5 of 9
(10,481 Views)

@rr1024 wrote:

Sounds like a great solution except I can't seem to add that text to the constant see attached. Obviously doing something wrong


Right-click on the input and select Create->Constant


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 9
(10,473 Views)
Solution
Accepted by rr1024

@rr1024 wrote:

Sounds like a great solution except I can't seem to add that text to the constant see attached. Obviously doing something wrong


Uhhhh... never seen that before. It looks like you're just trying to put down some kind of generic selector box. What happens when you right click the input and select Create > Constant.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 7 of 9
(10,472 Views)

That box is actually an Enumeration, a specific type of constant assoicated with that file open VI.  You need to right-click on the connector and say Create->constant and that will give you the correct one.

Message 8 of 9
(10,470 Views)

@James.M wrote:

@rr1024 wrote:

Sounds like a great solution except I can't seem to add that text to the constant see attached. Obviously doing something wrong


Uhhhh... never seen that before. It looks like you're just trying to put down some kind of generic selector box. What happens when you right click the input and select Create > Constant.


LOL, thanks the right click works great and never new that......newbie error

Thanks

0 Kudos
Message 9 of 9
(10,460 Views)