5.6. Using the _STATUS and _RETURN Parameters in Macros

The Mechanical APDL program generates two parameters, _STATUS and _RETURN, that you can also use in your macros. For example, you might use the _STATUS or _RETURN value in an "if-then-else" construct to have the macro take some action based on the outcome of executing a Mechanical APDL command or function.

Solid modeling functions generate the _RETURN parameter, which contains the result of executing the function. The following table defines the _RETURN values for the various solid modeling functions:

Table 5.1:  _RETURN Values

CommandFunction_RETURN Value
Keypoints
K Defines a keypointkeypoint number
KL Keypoint on a lineKeypoint number
KNODE Keypoint at nodeKeypoint number
KBETW Keypoint between two keypointsKP number
KCENTER Keypoint at centerKP number
Lines   
BSPLIN Generate splineLine number
CIRCLE Generate circular arc lines First line number
L Line between two keypointsLine number
L2ANG Line at angle with two linesLine number
LANG Line tangent to two linesLine number
LARC Defines a circular arcLine number
LAREA Line between two keypointsLine number
LCOMB Combine two lines into oneLine number
LDIV Divide line into two or more linesFirst keypoint number
LDRAG Line by keypoint sweepFirst line number
LFILLT Fillet line between two liensFillet line number
LROTAT Arc by keypoint rotationFirst line number
LSTR Straight lineLine number
LTAN Line at end and tangentLine number
SPLINE Segmented splineFirst line number
Areas
A Area connecting keypointsArea number
ACCAT Concatenate two or more areasArea number
ADRAG Drag lines along pathFirst area number
AFILLT Fillet at intersection of two areasFillet area number
AL Area bounded by linesArea number
AOFFST Area offset from given areaArea number
AROTAT Rotate lines around axisFirst area number
ASKIN Skin surface through guiding linesFirst area number
ASUB Area using shape of existing areaArea number
Volumes
V Volume through keypointsVolume number
VA Volume bounded through areasVolume number
VDRAG Drag area pattern to create volumeFirst volume number
VEXT Volume by extruding areasFirst volume number
VOFFST Volume offset from given areaVolume number
VROTAT Volume by rotating areasFirst volume number

Executing a Mechanical APDL command, whether in a macro or elsewhere, generates the parameter _STATUS. This parameter reflects the error status of that command:


Release 18.2 - © ANSYS, Inc. All rights reserved.