NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get MenuGroupName of Currently Running Step(C#)

I'm trying to get information about the currently running Step.  For example I can get it's status by doing the following (executed when a trace UImessage event is sent):
 

e

.uiMsg.Thread.GetSequenceContext(0, out frameId).AsPropertyObject().GetPropertyObject("RunState.Root.Step", 0).GetValString("Result.Status",0);

 

How Would i go about getting information about the current step's StepType?  So say I wanted to get its MenuGroupName.  How would I go about doing so?

0 Kudos
Message 1 of 4
(3,121 Views)
<Step>.StepType.MenuGroupName
0 Kudos
Message 2 of 4
(3,117 Views)

Can you elaborate a litte James:

 

I've Tried:

e

.uiMsg.Thread.GetSequenceContext(0, out frameId).AsPropertyObject().GetPropertyObject("RunState.Root.Step.StepType.MenuGroupName", 0).GetValString("",0);

 

or

e

.uiMsg.Thread.GetSequenceContext(0, out frameId).AsPropertyObject().GetPropertyObject("RunState.Root.Step.StepType", 0).GetValString("MenuGroupName",0);

 

But it just doesn't seem to work.

0 Kudos
Message 3 of 4
(3,114 Views)

Most API properties are just plain ActiveX properties and are not also dynamic PropertyObject sub-properties. Even some of those that are have different undocumented property object names. Thus you can't access API subproperties in the lookup string you pass to GetPropertyObject.

Try <context>.Root.Step.StepType.MenuGroupName. I don't think you need to call AsPropertyObject or GetPropertyObject.

0 Kudos
Message 4 of 4
(3,100 Views)