NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access an enumeration from a .NET Assembly?

Hello,

 

I know TestStand supports enumerations in .NET method calls. But let us say the return value of a method which is an enumeration has to be compared to an enumeration definition, how do I do this. Is this even supported? I think this a serious limitation especially since converting structs to types is supported.

 

An example there is enum called

ABC

{

Val1,

Val 2

}

 

A .NET method returns as an out parameter this enum. Now I need see if the returned value is Val1 or Val2.

 

Thanks,

Harsha

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

Yes TestStand supports enumerations in the function calls, however, you can't actually use that enumeration inside of TestStand other than the function call because that enum has no context inside of TestStand.  

So once you get your return value into TestStand as an enum, this is stored and treated as any other integer (number) value.

If you want to use Val1 and Val2 inside of TestStand, you have to declare them in TestStand.

0 Kudos
Message 2 of 2
(2,862 Views)