From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,346 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,344 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,336 Views)

Good tip!

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

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

0 Kudos
Message 15 of 16
(1,014 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
(885 Views)