NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify environment when using custom OI

Solved!
Go to solution

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 Smiley Sad I guess seqedit has hardcoded Global environment settings?

 

How are the default folders setup?

0 Kudos
Message 11 of 16
(1,438 Views)

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.

0 Kudos
Message 12 of 16
(1,436 Views)

You'll want to call it before ApplicationMgr.Start(). It should throw an exception if you try to set it after that.

-Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 13 of 16
(1,428 Views)

Good tip!

0 Kudos
Message 14 of 16
(1,420 Views)

Hi rfdecarre11, how do you create an instance of IEngineInitializationSettings class in LabVIEW?

0 Kudos
Message 15 of 16
(1,106 Views)

EngineInitializationSettings.SetEnvironmentPath wrapper in the attachment.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 16 of 16
(977 Views)