Using ArTextSysGetText() with C

Hello. If I understand correctly, function block ArTextSysGetText() from ArTextSys library can be used to read values of strings generated by LocalizableTexts.tmx file. One of the inputs required by the function block is the address of the namespace and text id of the string in tmx file. How to get the values for these addresses in a C project. The post at Reading and writing texts to string variables - Ask Questions / HMI & Visualization - B&R Community goes over how to use the function block with structured text, and I can see them using ADR(“Namespace”) to get the address. Is there alternative that can be used with C? I created a default LocalizableTexts.tmx file in a project, added the file to the text system configuration and tried to use references to “Default-namespace” and “Samples.HELLO_WORLD” but the compiler can’t find such variables in the project. A short example of how to use ArTextSysGetText() with C would be greatly appreciated.

Hi @Alex_Kolesen ,
Welcome to our Community!
below my test (I asked AI: “How can I use B&R function block ArTextSysGetText in ANSI C?”, the code generated didn’t work but it added a lot of comments…hehe):

Ciao
Valerio

This is exactly what I was looking for. Thank you Valerio.