From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Extending NI_Flow_For does not insert correct End step specified in BlockEndStep

Solved!
Go to solution

Hi !

I need to extend the For capabilities in my sequences.

So I buil a new step type (My_For) that I combined with the NI_Flow_For type. Then I added some properties to fulfill my requirements.

I did the same with the NI_Flow_End step type (My_End).

Both step defintions were created in MyTypes.ini.

 

 

In 'My_For' type definition, I set the 'BlockStartTypes' to empty string ("") ; and 'BlockEndType' to 'My_End'.

In 'My_End' type definition, I set the 'BlockStartTypes' to 'My_For' ; and 'BlockEndType' to empty string ("").

 

Then, when I insert a step 'My_For' in a sequence, it creates a 'NI_Flow_End' step but not a 'My_End' step !!!

If I delete the automatically created 'My_End' step, and drag'n drop a 'My_End' step below the 'My_For' it works !

 

So I'm guessing that the problems come from the OnNewStep substep which is doing something wrong, but I can't see what's not good in the properies I set...

 

Any idea ?

 

 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 3
(3,571 Views)
Solution
Accepted by topic author CyGa

The OnNewStep custom substep is programmed to insert the "end" step.  NOT to be smart enough to know the specified end block and insert that step.  You need to write your own OnNewStep substep code that inserts the "my_end" end block step where you want it, and configure it properly (half of the issue is also that when you insert pairs of steps, you may need the start/end steps to be configured specially, not just inserted.

 

 

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

Hi Warren_scott,

 

Thank you for your answer !

It would have been nice form NI to build a 'clever' step or to give its source code as model.

What do you mean by 'especially configure' pairs of steps and not just insert them ? Do I need to do something particular after inserting 'my_end' step ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 3
(3,534 Views)