NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom step to Open edit expression when placed in sequence

Solved!
Go to solution
In TestStand 3.5 is it possible to create a custom step type (from a copy of label step type) that automatically opens the "edit label step.." GUI when placed in a sequence?

Thanks,
Jason
0 Kudos
Message 1 of 13
(5,059 Views)

Hi,

 

Check out in your Step Properties -> Substeps that there is under Edit the exportfunction EditLabelStep from CommonSubsteps.dll is selected.

(I have checkout this in TS4.0 sorry i have no 3.5 avaible but i should be the same) 

But i wonder if you copy the step this should already be done for you.

 

Hope this helps

 

juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 13
(5,046 Views)

Hi,

 

Unlike TestStand 4.x where the Edit Label is presented in the Step Setting window. With TestStand 3.5 you have to invoke the Edit Label dialog.

 

You would have to change the CommonSubsteps.dll function to launch the dialog when the step is inserted.

 

You will find all the source code available in the Components\NI\StepType folder.

 

Make you sure you copy this to the \User\ folder before making any changes.

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 3 of 13
(5,042 Views)
Solution
Accepted by topic author jason1

All -

 

Why not just capitalize upon the capabilities of the OnNewStep substep? 

 

Create your new step type (a copy of your existing Label step).  Notice that it already has as its substep an Edit step - this is what is invoked when you launch the Edit Label Step dialog.  

 

Now, create a new Custom substep and name it (this is mandatory) OnNewStep.  Specify its Module and mimic the Edit Substep exactly.

 

Now, whenever you create a new Step instance of this type, the OnNewStep substep will be invoked!  And you don't even have to modify the CommonSubsteps.dll.

 

A cool trick - this is how we do things like programmatically create End steps for many Flow Control steps...

 

Message Edited by DRock on 02-24-2009 07:44 AM
Derrick S.
Product Manager
NI DIAdem
National Instruments
Message 4 of 13
(5,038 Views)

Hi Derrick,

 

That was new to me! The documentation can be found at 13-6 and you overread it very easy. Good there is a search function on Adode! 

so i would never found it.

 

Question on it: How it acts on Execution in editor or userInterface. If i am right it will be performed one time on single step creation during runtime.

Are there any more features out on the "unused and typically not TS called" custom substep call?

 

Greetings

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 13
(5,024 Views)

Hi Derrick,

 

Is OnNewStep available in TestStand 3.5

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 6 of 13
(5,021 Views)

Obviously it is, seeing the Accepted Result as I returned from submitting response

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 7 of 13
(5,016 Views)
Thanks! That worked perfectly for me.

Next question: Is there a way to color the back ground or text color for this custom step?
0 Kudos
Message 8 of 13
(5,015 Views)

OnNewStep is definitely possible in NI TestStand 3.5, and is the only non-obvious Substep that I know of - the NI TestStand Reference Manual seems to confirm this.   

 

This Substep will not have an effect during Execution (unless for some reason it is manually called by a code module or user interface).  Juergen (I assume from your previous signatures that you are near the Bodensee?  I spent a few weeks in Lindau.  Okay back to TestStand) - you are correct - it is called once and only once, upon creation and placement of a new step of that type.  

 

Jason1 - I know of no way to color the background/text of the step.  Perhaps Ray or Juergen can weigh in on this, but I've never seen it done and I don't believe it's possible.

 

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 9 of 13
(4,995 Views)

Derrick,

 

I couldn't find any mention of it in the 3.5 Reference Manual but its in the 4.1 manual.

I tried it anyway and like Juergen and Jason1 says - it works a treat.

 

I dont think you can change the background/text.

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 10 of 13
(4,960 Views)