NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Create PropertyObject from a variable

Hello together,

 

I have an issues I cannot solve:

 

I have a local variable "Locals.variable" contains a string with the value "test".

I have a parameter container with several elements.

One of the elements has the name "test" -> "Parameters.container.test"

 

I need to access the PropertyObject of "Parameters.container.test" through the Variable "Locals.variable" value "test".

 

Like

Parameters.container.(Access through Locals.variable value "test").

 

Backround of the questions is the following task:

I read from a text file different values. These values I want to put into the parameters without matching every parameter inside the sequence. The textfile contain topic (name of the parameter) and the value.

I am using a while loop to go through the whole textfile and read every name of the parameter and match the values to the parameter inside the testsequence.

 

I hope my issue is clear.

 

Thanks in advance.

 

0 Kudos
Message 1 of 2
(1,138 Views)

This should work:

 

Parameters.Container.GetPropertyObject(Locals.variable,0)

 

If you actually want the actual value, you'd need to use one of the others (GetValString, etc..)

 

 

Hope this helps!

Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 2
(1,108 Views)