ansys.mapdl.core.Mapdl.cfwrite#
- Mapdl.cfwrite(command='', **kwargs)#
Writes a Mechanical APDL command (or similar string) to a “command” file.
Mechanical APDL Command: *CFWRITE
- Parameters:
- command
str
Command or string to be written. The standard command form of a label followed by arguments separated by commas is assumed.
Command
may be a parameter assignment (for example, cfwrite, A = 5).
- command
Notes
Warning
This function contains specificities regarding the argument definitions. Please refer to the command documentation for further explanations.
Argument Descriptions
command : str
- Command or string to be written. The standard command form of a label followed by arguments separated by commas is assumed.Command
may be a parameter assignment (for example, cfwrite, A = 5).
Writes a Mechanical APDL command (or similar string) to the file opened via cfopen. The
Command
string is not executed (except that numeric and character parameter substitution and operations (with imbedded *, /, >, etc. characters) are performed before writing).When used with get results and parameter substitution, a command can be created from results and then read back into the Mechanical APDL program (or used elsewhere). For example, if the command cfwrite,BF,NNUM,TEMP,TVAL is used in a do-loop, where TVAL is a parameter value returned from the get operation and NNUM is a specified or returned parameter value, a series of bf commands, with numerical values substituted for the two parameters, will be written.
To create a file without parameter substitution, issue create.
This command is valid in any processor.