2. Macro-order catalog#
Here is the skeleton to be completed from the code_aster/cata/cata/commands/conv_mail_med.py
catalog:
from.commons import*
from.. language.DataStructure import*
from.. language.Syntax import*
CONV_MAIL_MED = MACRO (
name=" CONV_MAIL_MED ",
op= OPS ("code_aster.macrocommands.conv_mail_med_ops.conv_mail_med_ops"),
sd_prod= ... ,
reentrant= ... ,
fr=tr ("Convert a ASTER, GMSH, or GIBI mesh to the MED format. "),
UNITE_IN = ... ,
FORMAT_IN = ... ,
UNITE_OUT = ... ,
INFO = ... ,
)
2.1. Catalog description#
op
defines the path that will be used to import and launch the function
main order. The last element is the name of the function, the rest
allows you to import the file. The equivalent would be:
from code_aster.macrocommands.conv_mail_med_ops import conv_mail_med_ops
The macro commands are also embedded with an « executor » (cf. Executer of the order),
specific since it is executeMacro
instead of executeCommand
.
There is nothing to write for a new macro command.
The other arguments are the same as those for commande.
2.1.1. Keywords to add#
UNITE_IN is a mandatory simple keyword. It is necessary to define the expected type.
FORMAT_IN is a simple, optional keyword that should only accept one of the three values” ASTER “,” GIBI “,” “,” GMSH “, set to” ASTER “by default.
UNITE_OUT is a mandatory simple keyword. We will look in the catalog of The IMPR_RESU command the by default value used in MED format.