Step.CreateCode
- Aktualisiert2025-07-21
- 1 Minute(n) Lesezeit
Step.CreateCode
Syntax
Step.CreateCode
Return Value
Indicates if the step was modified.
Purpose
Creates a code module for this step.
Remarks
The contents of the code module depend on the adapter used to create this step, the module settings for this step, and the code templates configured for the step type.
For adapters that use Microsoft Visual Studio, calling this method can result in prompts to the user if any of the following conditions exist:
- Multiple versions of Visual Studio exist on the computer and you select the Always Prompt for Version option from the Version of Visual Studio to Use for Create and Edit Code ring control in the Adapter Configuration dialog box.
- Multiple versions of Visual Studio exist on the computer and you select the Use the Version that Matches the Project File option from the Version of Visual Studio to Use for Create and Edit Code ring control in the Adapter Configuration dialog box, and TestStand cannot match the version of the file.
- A method already exists with the same name.
- The specified solution does not contain the specified project.
- The specified project does not contain the specified source file.
Note
Some adapters do not support this method. Use the
Step.CanCreateCode
method to determine whether the step can create code with this method.