NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Enviroment variable

Hi

 

Is it possible in Teststand 2014 to locate the process model by using a enviroment variable ?

I have created a enviroment variable <TestsystemModel>

When i go to Configure > Station option > model > i want to set <TestsystemModel>\Mymodel.seq

 

Thanks in advance

Tonnie

0 Kudos
Message 1 of 7
(5,521 Views)

Hi Tonnie,

 

How is your application coming along?

 

I just wanted to clarify a couple of points in your original forum post:

 

1.) By "locating the process model", are you referring to actually finding what process model you are using? Or locating the file path of where a particular process model is located?

 

2.) By "environment variable", are you referring to Windows based environment variables, are ones from within TestStand? Is there a particular environment variable you are aiming to use to complete your required functionality?

 

Kind regards,

 

Hashim Shamsi

0 Kudos
Message 2 of 7
(5,387 Views)

Hello HashimS

 

I have still not found a solution for the enviroment variable

By "Locating the process model" i mean the path to the process model

With "Enviroment variable" i mean the windows enviroment variable.

 

I want to locate the process model via a enviroment variable

For instance <TestModel>\Myprocessmodel.seq where <TestModel> = C:\CompanyName\Models

 

0 Kudos
Message 3 of 7
(5,377 Views)

Hi Tonnie,

 

Since reading your forum post, I have conducted some research of my own as well as talk to some of my colleagues who have a lot of experience with the TestStand environment.

 

Unfortunately, it looks like that this is not possible within TestStand using an environment variable.

 

May I ask what your application is and why you require to do this in this particular way? Perhaps there is a work around to this sort of problem.

 

Kind regards,

 

Hashim Shamsi

0 Kudos
Message 4 of 7
(5,369 Views)

Hi Tonnie-

 

It is a unclear why you are attempting to locate the path to the Process Model file from a Windows Environment Variable. Would you explain in more detail what you are trying to achieve with this approach?

 

More generally, you can access the path to the Process Model file path in several ways (depending on context):

 

1. Within the context of an Execution - use the ModelSequenceFilePath property (e.g. Locals.ModelPath = Runstate.Execution.ModelSequenceFilePath)

 

2. To access the Station Model SequenceFile object - use the Engine and call the GetStationModelSequenceFile method (e.g. Locals.ModelPath = RunState.Engine.GetStationModelSequenceFile(Locals.ModelDescriptionString).ModelPath)

 

3, To access the currently configured Station Model specificed in your Station Options - use the StationModelSequenceFilePath Property (e.g. Locals.ModelPath = Runstate.Engine.StationOptions.StationModelSequenceFilePath)

 

This list may not encompass all possible ways to access the Process Model file path for a given context. However, this should provide you with some direction.

 

-Jeff

0 Kudos
Message 5 of 7
(5,368 Views)

Hi Jeff

 

The reason i ask this is the following

When we install a new test pc we make use of an unattended install for the operating system and for the national instruments software.

We would like to install a enviroment variable on each testsystem with the path to the processmodel on the network.

For instance <TESTSYSTEM>\Processmodel.seq  where <TESTSYSTEMS> =  J:\CompanyModels

 

Then the location changes in the future we want to update all testers automaticaly by changing the enviroment variable.

 

Tonnie

0 Kudos
Message 6 of 7
(5,347 Views)

Hi Tonnie,

 

Sorry if this response comes late. I'm working with a similar setting hope this helps you.

What you need to do is to change the reference of the TestStand Public Folder, to do this you need to change the registry, and you can do this as following:

How to Configure a Custom Public Directory for TestStand 4.1 and Later

 

I tested it with TestStand 2014 and using another driver (N:\) and is working. I also checked the Enviromental Variables for TestStand:

TestStand -> C:\Program Files\National Instruments\TestStand 2014

TestStandAppData -> C:\ProgramData\National Instruments\TestStand 2014 (32-bit)

TestStandBin -> C:\Program Files\National Instruments\TestStand 2014\Bin

TestStandPublic ->  C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)

 

After I made the changes and directed the Public Folder to N:\, it seems that it's ignoring the Enviromental Variables and using the registry path. So your Process Model could be in the Public Folder.

 

Hope this helps!!! And sorry if it's late.

 

Tania

 

0 Kudos
Message 7 of 7
(4,677 Views)