0 function usage and syntax guidelines – MTS Fracture Analyzer User Manual

Page 88

Advertising
background image

Description

Item

the new name shows in this box. The name is case-sensitive, and must not
contain spaces.

Shows the function category. If you create the function through the Specimen
Geometry Manager, the category is Geometry. If you create the function from
the Test Definition, the category is Test Definition.

Category

Shows how to use your function and the arguments required. As you enter
the function name and the variables in the work area, you will see the name
and variables replace the generic text in the Usage box.

Usage

Enter your function in this area. You can add, edit, and delete functions and
arguments by changing the def line.

Python Code

Validates your code as you are entering it. You see a descriptive message
for invalid statement syntax. “Validation successful” indicates valid statement
syntax.

Validation

Functions

To change a function using the Specimen Geometry Manager:

1. In the Specimen Geometry Manager window, select the specimen geometry that includes the function

you want to change and click Copy or Edit.

The Specimen Geometry Editor window appears.

2. Click Function Manager.

The Functions window appears.

3. Click Edit.

The Edit Function window appears.

4. Type your changes to the Python code.

The result of the code syntax validation appears in the bottom panel of the window.

5. When you have finished, click OK to return to the Functions window.

7.7.2.0 Function Usage and Syntax Guidelines

SetValue

To set a test variable in a function, you must enter the code as in the following example:

TestVariableX.SetValue(10)

88 MTS TestSuite™ Fracture Analyzer User Guide

7.0 Variable Analysis

Advertising