StepType.AddSubstep

Syntax

StepType.AddSubstep( newSubstep)

Purpose

Adds a new substep to the step type.

Remarks

Use substeps to define standard actions, other than calling the step module, TestStand performs for all instances of the step type. You can specify one of the following four categories for a step type:

  • Pre-Step substeps —TestStand calls the Pre-Step substeps before calling the step module. You can implement a Pre-Step substep to retrieve and store measurement configuration parameters into custom step properties the step module can access.
  • Post-Step substeps —TestStand calls the Post-Step substeps after calling the step module. You can implement a Post-Step substep to compare the values the step module stores in custom step properties against limit values the Edit substep stores in other custom step properties.
  • Edit substeps —An Edit substep launches a dialog box in which you can edit the values of custom step properties. For example, an Edit substep can launch a dialog box in which you specify the high and low limits for a test. The Edit substep can then store the high and low limit values as step properties. Dialog boxes that the specified Edit substep code module launch must be modal. For all dialog boxes except the Microsoft Foundation Classes dialog boxes, use the Engine.NotifyStartOfModalDialogEx and Engine.NotifyEndOfModalDialog methods of the TestStand API. Refer to the examples in the <TestStand Public> \Examples\Fundamentals\Launching a Modal Dialog directory for more information about how to use modal dialog boxes.
  • Custom substeps —TestStand does not call Custom substeps. You can use the TestStand API to invoke a Custom substep from a test module, user interface, or other code module.

Parameters

newSubstep As Step

[In] Specifies the new step to be added as a substep for the current step type. Create a new step to pass for this parameter by calling the Engine.NewStep method and specifying Substep , EditSubstep , PreSubstep , or PostSubstep as the value for the stepTypeName parameter of the Engine.NewStep method.

See Also

Engine.NewStep

Engine.NotifyEndOfModalDialog

Engine.NotifyStartOfModalDialogEx

Step

StepType.GetSubstep

StepType.NumSubsteps

StepType.RemoveSubstep

StepType.SwapSubsteps