11-06-2018 05:35 PM
Can you elaborate on why this didn't work?
I tried setting the "TestStand" environment variables of a cmd.exe instance to my AppData and PubDocs folders. When I ran seqedit.exe from that cmd.exe I was hoping the engine would use those environment variables and launch in a fake Global environment that I had overridden.
That didn't work I guess seqedit has hardcoded Global environment settings?
How are the default folders setup?
11-06-2018 06:15 PM
Hold up...
That link you sent before had a snippet that I didn't think would work, but did.
I created an instance of IEngineInitializationSettings class in LabVIEW and used SetEnvironmentPath() before calling ApplicationManager.GetEngine() and it worked.
The instance of ApplicationManager was likely already loaded at the point where I called SetEnvironmentPath(), so I figured it would not work, but it did! So I can use that in my TSUI to set the environment.
11-07-2018 08:04 AM
You'll want to call it before ApplicationMgr.Start(). It should throw an exception if you try to set it after that.
-Trent
11-07-2018 12:14 PM
Good tip!
05-02-2021 06:34 PM
Hi rfdecarre11, how do you create an instance of IEngineInitializationSettings class in LabVIEW?
10-10-2021 04:17 PM
EngineInitializationSettings.SetEnvironmentPath
wrapper in the attachment.