12-09-2022 07:05 AM - edited 12-09-2022 07:19 AM
Hello,
Solved! Go to Solution.
12-09-2022 07:16 AM
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:
12-09-2022 07:27 AM
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
12-09-2022 07:34 AM
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
12-09-2022 08:53 AM
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
12-09-2022 10:20 AM
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!
12-09-2022 10:46 AM
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
12-09-2022 11:25 AM
Here you go.
12-09-2022 02:56 PM
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.