NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain Type of Container Sub Property for calling appropriate SetVal method

Hi All,

 

I am wanting to check the type of a container sub-property. This will then enable me to call the appropriate SetVal method, i.e. SetValInteger64 or SetValBinary.

 

Could someone provide assistance on the call I need to make to achieve this?

 

The following returns whether it is Number, String, etc.. however I would like to know whether it is a Int64, float, etc.

 

TypeOf(Locals.TestSetup.GetNthSubProperty("", 1, 0).GetTypeFlags("", 0)) 

 

I will then handle the type and make a call using something like this:

 

Locals.TestSetup.GetNthSubProperty("", 1, 0).SetValInteger64("", 0, Int64(23))

 

Any tips or advice would be greatly appreciated.

 

Cheers,

 

Cam.

 

0 Kudos
Message 1 of 3
(2,721 Views)

Locals.TestSetup.GetNthSubProperty("", 1, 0).Type.ValueType

 

-Doug

Message 2 of 3
(2,717 Views)

Thanks Doug, all solved.

0 Kudos
Message 3 of 3
(2,709 Views)