NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Flow control Step types through programatically in .NET

Hi Allen P,
I have one new problem how to create flow control step types in .NET at runtime and execute the same ?
Please explain me with examples.
 
Thank you,
 
Regards
RKK
0 Kudos
Message 1 of 26
(4,825 Views)

rkk,

Firstly, to create a new step, you will need to call Engine.Newstep.  This function takes two parameters, the important one for you is the second parameter.  This is the name of the type of step you would like to use.  These names can be found in your NI_FlowControl.ini types file.  For example, the "If" step is called "NI_Flow_If" and the "For" is called "NI_Flow_For".

To insert that new step into your sequence, you will need to call Sequence.InsertStep.

You also might find some useful information in this post
http://forums.ni.com/ni/board/message?board.id=330&message.id=10709&requireLogin=False

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 2 of 26
(4,804 Views)

Josh,

Thanks for reply. I would interest to know about .ini file. Where can I get it and how to use it in .NET.  How can I add multiple steps at run time?

Please suggest me how to implement.

Thank you

Regards

RKK

0 Kudos
Message 3 of 26
(4,800 Views)

Josh,

Thank you. May I know how to set condition expression for while loop, statement step expression in .NET?

Please help me.

Thank you

regards

RKK

 

0 Kudos
Message 4 of 26
(4,795 Views)
Josh,
 
Please find attachment explains the Problem which I got while run sequence file contains Do While step.
 
Please provide a solution with example.
 
Thank you
Regards
RKK
0 Kudos
Message 5 of 26
(4,794 Views)
Hi josh,
How to access individual step result in .NET?
 
Thank you,
regards
RKK
0 Kudos
Message 6 of 26
(4,790 Views)

Hi  josh,

I tried to access step result through .NET but not found any solution. I tried with the following code .

PropertyObject

objPropSeq;

objPropSeq = ObjSeq.AsPropertyObject();

if (objPropSeq.Exists("RunState.Step.DataSource", 0))

{

 bool value = objPropSeq.GetValBoolean("RunState.Step.Result.PassFail", 0);

}

0 Kudos
Message 7 of 26
(4,777 Views)

Hi  josh,

I tried to access step result through .NET but not found any solution. I tried with the following code .

PropertyObject

objPropSeq;

objPropSeq = ObjSeq.AsPropertyObject();

if (objPropSeq.Exists("RunState.Step.DataSource", 0))

{

  bool value = objPropSeq.GetValBoolean("RunState.Step.Result.PassFail", 0);

}

0 Kudos
Message 8 of 26
(4,777 Views)

Hi  josh,

I tried to access step result through .NET but not found any solution. I tried with the following code .

PropertyObject

objPropSeq;

objPropSeq = ObjSeq.AsPropertyObject();

if (objPropSeq.Exists("RunState.Step.DataSource", 0))

{

   bool value = objPropSeq.GetValBoolean("RunState.Step.Result.PassFail", 0);

}

0 Kudos
Message 9 of 26
(4,777 Views)

Hi  josh,

I tried to access step result through .NET but not found any solution. I tried with the following code .

PropertyObject

objPropSeq;

objPropSeq = ObjSeq.AsPropertyObject();

if (objPropSeq.Exists("RunState.Step.DataSource", 0))

{

    bool value = objPropSeq.GetValBoolean("RunState.Step.Result.PassFail", 0);

}

0 Kudos
Message 10 of 26
(4,777 Views)