12-11-2009 08:07 AM
Thanks Ben, I really appreciate your help. I have attached a simple version of my project that you can use to test. You will need to run test.vi and change the value of the Language enum to import strings to interface.vi. Let me know if you find anything, and again, thanks for your help.
-Cristian
12-11-2009 08:49 AM
Toosed the "hex 8" and only applied the mehtod when the VI is not running. See mod below.
Pay attention to the error messages. That is what gave me the clue to apply when not running.
Ben
12-11-2009 09:08 AM
Yes, I did note the error message returned. My ultimate goal is to be able to open multiple instances of the interface VI and import the strings to each instance. Interface.vi is a reentrant VI set to preallocate clone for each instance, so I should be able to open multiple references to this VI and import strings to each one.
Refer to this modified test.vi
12-11-2009 11:07 AM
Sorry but I will not be able to respond further until next Wednesday at the earliest.
You may want to start another thread and ref this one if nobody else replies.
Ben
12-11-2009 01:26 PM
I can't really fill Ben's shoes, perhaps just the left one. I would look into his very first suggestion of using a template. You can't do this directly, as you pointed out, but with a little help from scripting you can create a new VI from the template and import the strings to it (with a little hack). I think of it as manual reentrancy. The hack is to modify the string file so the name inside matches the newly created VI. To keep Untitled XX from appearing in the title bar, I give the FP a new title.
Not the way I would have thought to go about this. That doesn't make it right or wrong, just different. If/when you get it worked out I would be interested in trying it out to see how well it works.
12-11-2009 01:40 PM
Thanks Darin, I would have never thought of that. After some initial testing, it seems like this is exactly what I was looking for. I will keep you posted on how well it works once I integrate it into my application.
12-11-2009 01:51 PM
12-11-2009 01:59 PM
You need to go to the LabVIEW APIs webpage and download scripting and follow the directions to activate it. Just type Scripting into the search box at the very top of the page (to search ni.com, not the forum). You may not ever write your own code using scripting (although I highly reccommend it), it does give you some extra properties and methods, and oftentimes an escape hatch when you need to workaround a problem.
BTW, the shoe is almost always (and by almost always I mean always) on the other foot, but Ben's initial suggestion of the template and later efforts were helpful, so you may want to "thank" him for it.