Determine material number using the material name
Sometimes the variant gets a material in its real name as parameter (e.g. "1.4301 240 grain"). In the variant, you can use a function to reset the material. However, the number of the material is required here and not the name.
The following function uses the material name to determine the corresponding material number from the material configuration.
C Determine material number using the material name
C
C call:
C CALL PBE077 (MATTEXT,IMAT,IRET)
C
C The following variables must be defined beforehand:
C
C MATTEXT : Variable with the material name (e.g. "DC01")
C IMAT : Result as return value, contains the material number
C IRET : is not evaluated, but must be specified
C
C Example:
C -------------------------------------------------
C Determine material number using the material name
C -------------------------------------------------
MATTEXT = "X5CRNI18-10"
C
CALL PBE077 (MATTEXT,IMAT,IRET)
C
C Use new material number in the main program:
C
C NEW DEFINITION OF HEADER-VALUES
PARAM (45) = IMAT
C