In my network I have CHOPs that output three different values. I want to take these values and create a text that is then placed in a textTOP. The idea is to create a version number.
What I have now is the values x, y and z that is created in CHOPs. I want to take these values to create a texttop that reads “Version: x.y.z”. I’m currently thinking of using DATs and python and format a string that way but to no success. Any ideas?
You could also dive into fStrings. A verry convinient way of formatting strings.
The core gist is that you start your string with an f and put python into { }
So for you it could be op("text5").par.text = f"VER{version}.{seed}.{hotfix}"
Another cool thing is that you can also give the f-string formatting instructions for numbers using :x.xf. So your complete string could become this: f"VER_{op('data')['ver'].eval():0.0f}.{op('data')['seed'].eval():0.0f}.{op('data')['hotfix'].eval():0.0f}"
Writing them into variables in script is advised though https://python-reference.readthedocs.io/en/latest/docs/str/formatting.html#conversion-flags