12-13-2023 01:16 AM
Hi everyone,
does anybody know if it's possible to open a .json-file in Teststand and store the text in a string?
Thank you
Tobi
Solved! Go to Solution.
12-14-2023 09:20 AM
You mean like a build in function?
12-15-2023 03:18 AM
Yea, maybe a build in function or if not possible any workaround. Because I have a .json file with text in it and want to store it in a variable to search for specific words.
12-15-2023 03:24 AM
I'd reccommend creating a code module returning the JSON string for storing in a variable.
Yet I don't recommend string parsing using TestStand string functions. You should use code moules for this as well!
12-15-2023 08:11 AM
I have tried to inform myself about code modules but unfortunately have found very little. Does this mean the action step with which you can call python/.net/c++... scripts from the desktop, for example, or what exactly is a code module?
12-15-2023 08:36 AM - edited 12-15-2023 08:37 AM
You should've taken the course 😉
https://www.ni.com/docs/de-DE/bundle/teststand/page/code-modules.html gives an introuction into the concept.
And there's lots of stuf to learn from in %teststandpublic%\Examples
Basically, the whole architecture of TestStand relies on calling external code to perform tests, complex calculations, ...
As far as I remember your past postings, you used command line operations and evaluating stdout. Guess you have to take the next step now and go for a real programming language or Python 😉
P.S. you can do a certain amount of programming in TestStand, but it is no programming language itself
01-19-2024 05:26 AM
Hi Oli,
sorry for the late reply, I was pretty busy.
Now I did it by implementing a python script.
Thank you 🙂