slashtee#
- MacroFiles.slashtee(label='', fname='', ext='', **kwargs)#
Writes a list of commands to a specified file at the same time that the commands are being executed.
Mechanical APDL Command: /TEE
- Parameters:
- label
str Specifies how Mechanical APDL is to interpret this slashtee command:
NEW- Signals the beginning of the command text that is to be written toFname. IfFnamealready exists, specifying NEW causes the contents ofFnameto be overwritten.APPEND- Indicates that you want to append toFnamethe command text that follows.END- Signals the end of the command text that is to be written to or appended toFname.
- fname
str File name and directory path (248 characters maximum, including the characters needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name.
- ext
str Filename extension (eight-character maximum). If you plan to execute the file as if it were a Mechanical APDL command, use the extension
.mac.
- label
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
label : str- Specifies how Mechanical APDL is to interpret this slashtee command:NEW- Signals the beginning of the command text that is to be written toFname. IfFnamealready exists, specifying NEW causes the contents ofFnameto be overwritten.APPEND- Indicates that you want to append toFnamethe command text that follows.END- Signals the end of the command text that is to be written to or appended toFname.
fname : str- File name and directory path (248 characters maximum, including the characters
needed for the directory path). An unspecified directory path defaults to the working directory; in this case, you can use all 248 characters for the file name. *
ext : str- Filename extension (eight-character maximum). If you plan to execute the file as if it were a Mechanical APDL command, usethe extension
.mac.You can use the slashtee command to record a macro to a specified file at the same time that the macro is being executed. It is similar to the Linux tee command.
For more information about the slashtee command, see the of the Ansys Parametric Design Language Guide.
The following example illustrates the use of the slashtee command. If you issue these commands:
/tee,new,myfile,mac et,1,42,0,0,1 ex,1,3e7 /tee,end /tee,append,myfile,mac n,1,8 n,5,11 fill ngen,5,5,1,5,1,0,1 /tee,end
the content of myfile.mac is:
et,1,42,0,0,1 ex,1,3e7 n,1,8 n,5,11 fill ngen,5,5,1,5,1,0,1
This command is valid in any processor, but only during an interactive run.