05-07-2019 09:20 AM
Hi,
I am test-driving TestStand enviroments option. Everything works fine so far, but I am stuck launching TestStand using an enviroment from LabVIEW.
Can anyone give advice?
Cheers
Oli
Solved! Go to Solution.
05-07-2019 09:34 AM
Hey Oli,
Could you be a bit more specific? Are you launching a TestStand operator interface from LabVIEW?
If so, you can use the command line with the environment flag to launch a specific TestStand environment as shown in this help document. This tutorial might also be helpful for you.
Thanks,
Roxy
05-07-2019 09:43 AM
Hi Roxy,
sorry. I have a proprietary OI written in LabVIEW. Today, I am invoking the Start method on the TS AppMngr Ref.
But I haven't found a way to specify to specify the enviroment to use respectively to define command line parameters to use the /env option
Starting directly with the /env option from Command Line works fine.
05-07-2019 11:44 AM
Are you trying to launch the LabVIEW test executive.exe?
05-07-2019 12:00 PM
Hey Oli,
If you want to do this in the LabVIEW VI and not from the command line, first create an instance of EngineInitializationSettings and SetEnvironmentPath and set the environment before calling the AppManager. Alternatively, depending on the rest of the scenario, you could modify the otherwise unused command line and let AppManager parse it like in this example.
Let me know if I can help more!
Thanks,
Roxy
05-08-2019 02:38 AM
@ Ray:
I have an executable programmed in LV which starts the TestStand to run the sequence. but I am starting TestStand using the API, not the command line.
@Roxy:
Thanks for the guidance, I have breifly checked the example and realize, I have to re-check my old libraries: the first thing I used to execute is IApplicationManger.Start . I am investigating where this is coming from, probably copied it from old examples.
I will try as you described.
Thanks for the swift help.
07-26-2019 03:15 AM
After having spent a consoderable amount of time not working on this topic
It took me some time to figure out how to create the EngineInitializationSettings object. So here is my solution:
This approach seems to work when changing form <Global> enviroment to a specific one. Yet I haven't been able to change from a specific enviroment back to <Global>
I have tried:
Any hints?
Cheers
Oli
07-29-2019 11:39 AM
@Oli_Wachno wrote:
This approach seems to work when changing form <Global> enviroment to a specific one. Yet I haven't been able to change from a specific enviroment back to <Global>
The Engine relies on initialization settings from the environment that cannot be changed once it is initialized. You have to close the application entirely and re-launch it with the correct environment. If you don't specify any other environment, it should use the <Global> one.
07-30-2019 04:20 AM
@WireWeaver wrote:
@Oli_Wachno wrote:
This approach seems to work when changing form <Global> enviroment to a specific one. Yet I haven't been able to change from a specific enviroment back to <Global>
The Engine relies on initialization settings from the environment that cannot be changed once it is initialized. You have to close the application entirely and re-launch it with the correct environment. If you don't specify any other environment, it should use the <Global> one.
Understood, thanks. Everything is working as expected now.
Though I have to admit, I was not able to reproduce the error that was thrown, when connecting an empty string as enviroment path to the invoke node.