LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Import VI Strings from a .exe application

Hi,

When I try to load a language file (generated with Export )  into my vi from my .exe application it doesn't work. How could I solve this?

I need to load my language file into the vi that I'm opening in run time.

Thanks in advance,

ToNi.
0 Kudos
Message 1 of 9
(3,070 Views)
Hi ToNi

 If I understand it right, the VI works fine (loads the text file) in the development enviroment but when you build the executable It doesn't load it anymore. Is that correct?

  If so, the explanation (and workaround) can be found here

http://digital.ni.com/public.nsf/websearch/FD7DE8BC8FFC256C862565F4006BE363?OpenDocument

Hope it helps
Javier Gutiérrez
NI Application Engineering
Ahora los foros en castellano!
0 Kudos
Message 2 of 9
(3,052 Views)

Hi ToNi

I assume you use an invoke node, calling the import methods on vi strings. If you have a look at the LV help you will see that this function is not available in runtime.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 3 of 9
(3,045 Views)

hi Javier Gutiérrez,

 I am not able to import strings in the exe file .  I have to change my language in exe not in vi is that possible.

0 Kudos
Message 4 of 9
(1,876 Views)

HI Thierry,

             I need to import the string the after creating the exe . is that possible to do that . If yes kindly  tell me what the solution 

0 Kudos
Message 5 of 9
(1,867 Views)

Definitely you can't use Import VI Strings in an exe. You rather need to show Captions instead of Labels on your Front Panel, then, at runtime, read a message file and change Captions accordingly via the Caption.Text property of each control.

But beware that Unicode support in LabVIEW is very limited, check the available documentation here.

Especially if Unicode is involved, translation is not an easy and quick job.

There are a couple of tools in the LabVIEW Tools Network:

https://www.ni.com/en-us/shop/product/multilingual-labeling-toolkit.html

https://www.ni.com/en/support/downloads/tools-network/download.language-localization-toolkit.html

Honestly I don't know how they work and whether they allow translation at runtime or during development only.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 9
(1,866 Views)

Thanks for your comments bro,

                    I am having more than 200 control  and indicator to change. It is difficult to take al the property node from them as well as unicode is not supported in my version (LaVIEW7.1).   Is there any other option to change the language of control , indicator  and string constants during run time. 

0 Kudos
Message 7 of 9
(1,847 Views)

And thus the  multilingual  software can be used for n no of projects without any extra cost buying. Does it work for all type of control , indicator, constants and constants in block diagram  

0 Kudos
Message 8 of 9
(1,843 Views)

There are paid Toolkits in the LabVIEW Tools network to do that. Or you can roll your own, VI server provides all the functionality that is needed for this, but unless you plan to use this in several dozen different applications I can assure you that the payment of a Toolkit is a lot cheaper!

 

There are also various attempts from other users who posted some of their code which you can use for free.

 

https://github.com/rfporter/SET-Toolkit

https://github.com/JKISoftware/JKI-Simple-Localization

 

Without wanting to discredit any of this code, you will have to spend time to get used with all of them and paying for something like that is nothing more than fair if you do not want to roll your own code. There is some truth in the saying that you get what you pay for. 😁

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 9
(1,839 Views)