LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How i can save values answer in a file

Solved!
Go to solution

Hello,

How can I save the values of the answers following the question please?
I want to save the values in a text file on this format:
Question: value of the corresponding answer.
For example in the text file I want to have:
1. Mathématique: 20
0 Kudos
Message 1 of 9
(1,985 Views)

Hi Etiou,

 


@Etiou wrote:
How can I save the values of the answers following the question please?
I want to save the values in a text file on this format:
Question: value of the corresponding answer.
For example in the text file I want to have:
1. Mathématique: 20

Simple answer: use WriteToTextfile!

 

As that answer is really simple I need to ask:

  • What is your actual problem?
  • What have you tried?
  • Where are you stuck?
  • Why don't you attach your current VI?
  • Which LabVIEW version do you use?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(1,977 Views)

Hello GerdW,
Iput the vi file as an attachement. 
My problem is i cant get the value of the answer and put it in a file with this content: 
question: value of answer

0 Kudos
Message 3 of 9
(1,963 Views)

Your Question seems to be a string.  Your Answer seems to be a string.  You have two strings, you want to combine them into a single string (perhaps with some punctuation marks to separate Question from Answer, so you may want to combine three strings, Q, punctuation, and A).

 

Look at the functions on the String Palette.  Do you see any that look like they combine multiple strings into a single string?  Write yourself a little VI that takes two Strings (call them "Question" and "Answer") and outputs a line of text (call it "Output Line") that has the form "Question:  Answer".  Run your VI with strings in Question and Answer.  Did it work?

 

Bob Schor

0 Kudos
Message 4 of 9
(1,952 Views)

No it doesn't work, I created a text file and write the question in it and I used concatenate strings but I still don't have the answer value.
What I didn't understand is how to get the value of the answer as it is a radio button.
I think there are a few things I didn't quite understand about radio buttons. I guess it's simple but well

0 Kudos
Message 5 of 9
(1,925 Views)

You want to look at the rest of the string funcions, like format into string, to combine the numeric into a text string.  Here's a possibility.

 

I didn't pick out the answer, just the Enum value...but I showed you how to do that in the code.

 

Good luck, have fun learning LabVIEW!

0 Kudos
Message 6 of 9
(1,895 Views)

Hello cstorey,
I can't open your vi I have the 2020 version.
Can you send it back to me and save it to a previous version please?
Thanks

0 Kudos
Message 7 of 9
(1,881 Views)
Solution
Accepted by topic author Etiou
0 Kudos
Message 8 of 9
(1,862 Views)

As you're trying to figure things out, do us a favor and upload your most recent VI. Since you state "it doesn't work," we don't know what doesn't work because we haven't seen what you tried.

0 Kudos
Message 9 of 9
(1,843 Views)