NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
PWoodward

Enums as variants and strings

Status: New

I'm trying to pull out all parameters from a sequence when it errors and save it as an additional result. This is to help the debugging process in a custom report plugin.

 

It falls over when enums are used as they can't be pulled out as GetValVariants then converted to strings.

 

I suggest that the if a variant for enum is called it keeps the number and string text inside of it "[5] Item number 6" for example. This can then be interpretted into a string by Str().

 

Example expression:

Locals.ConcParams = Locals.ConcParams + "Parameter: " + RunState.Caller.Parameters.GetNthSubProperty("",Locals.X,0).Name + " Value: " + Str(RunState.Caller.Parameters.GetNthSubProperty("",Locals.X,0).GetValVariant("",0))

Certified LabVIEW Architect