NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Access to PropertyObject throught two referenced objects

Hi,

 

I would like to access Parameters.Pdc_ValAttendue.valAttendue object reference and value but I fail.

Please see the debug windows where you can view that I have tried some API methods without any success

 

Sans titre.png

0 Kudos
Message 1 of 7
(4,912 Views)

What version of TestStand are you using? In recent versions of TestStand you can use the dereference operator as follows:

 

**(Parameters.Pdc_ValAttendue)

 

It's a bit unusual to have two-levels of object references though. You should really only need one level of object reference variables in most cases in which case:

 

*(Parameters.Pdc_ValAttendue)

 

Would have been sufficient.

Hope this helps,

-Doug

0 Kudos
Message 2 of 7
(4,868 Views)

I am using TestStand 4.2.

Is there another solution please ?

0 Kudos
Message 3 of 7
(4,864 Views)

Maybe its that I use the wrong method to assign a temp variable.

 

I should assign it using antoher way to keep safe the variable object valAttendue type and value.

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

@niva wrote:

I am using TestStand 4.2.

Is there another solution please ?


To get the value you could do something like this:

 

Locals.obj.GetValInterface("", 0).AsPropertyObject.GetValBoolean("", 0)

 

But you will need to do something like this to set the value:

 

Locals.obj.GetValInterface("", 0).AsPropertyObject.SetValBoolean("", 0, newValue)

 

-Doug

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

@niva wrote:

Maybe its that I use the wrong method to assign a temp variable.

 

I should assign it using antoher way to keep safe the variable object valAttendue type and value.


How exactly are you setting this variable?

 

-Doug

0 Kudos
Message 6 of 7
(4,821 Views)

It's ok now. I have assigned my vars through another way.

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