01-30-2017 08:49 AM - edited 01-30-2017 08:53 AM
We are using Export/Import string to localize applications. We save the XML string of the front panel with Export string. Make the translation. During runtime we import the XML files to change the texts on the front panel and call the Run VI to execute our application. It work well with captions, labels and most of the controls. One exception we can't use it for default values for string controls. Import string works during edit time on everything. But with built application it do not import default values for string controls.
Any explanation for this?
KocsisP
01-30-2017 10:22 AM
It's hard to say without seeing any code but here are a couple of things you should look for:
01-30-2017 12:28 PM
I am a little confused.
Does "runtime" mean executable (run-time engine), or automation - running translation vi from development environment? Is target VI running during translation in the second case?
If you are localizing user interface only (not block-diagram), I would not use labels for Front panel. I am very surprised translation of labels works from run-time engine (or if VI is running). The same with default values - I would not expect their modification to work not from development.
Both actions require recompile of the VI. You can not call VI method DefaultValues -> Make Current Default from run-time engine. You can not set control property Label.text of the running VI. Captions are user interface, they can be changed at run-time.
One more confusion: how would import work if you have translated control label. It seems the only way to identify control. By order? Then any recompile, or vi edit can break the order of controls.
So for control data I would set current values (not default) through VI invoke node Control Value. Get all and Set.