Export material name in .mat file into .dat file

Moderator: GiD Team

Post Reply
Hemmi
Posts: 31
Joined: Fri Nov 20, 2015 6:05 am
Location: Chiba prefecture, Japan

Export material name in .mat file into .dat file

Post by Hemmi »

Let me know how to export the material name defined in .mat materials file into .dat file.

For example, if the material is given in .mat file like
  • NUMBER: 2 MATERIAL: Concrete
    QUESTION: E
    VALUE: 3.0e5
    QUESTION: NU
    VALUE: 0.2
    END MATERIAL
I want to export the string "Concrete" into my .dat file.
Let me know the command used in the .bas file.

HEMMI, Shigeru
http://petamagnetic.appspot.com
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Export material name in .mat file into .dat file

Post by escolano »

*MatProp(0) return the material name at .bas level

It is explained in the "GiD Customization Manual":
*MatProp. This is the same as the previous command except that it must be within a loop over the materials (see *loop). It returns the property whose field number or name is defined by its argument. It is recommended to use names instead of field numbers.
If the argument is 0, it returns the material's name.
e.g.

Code: Select all

*loop materials
  name=*matprop(0) E=*matprop(E) NU=*matprop(NU)
*end materials
Hemmi
Posts: 31
Joined: Fri Nov 20, 2015 6:05 am
Location: Chiba prefecture, Japan

Re: Export material name in .mat file into .dat file

Post by Hemmi »

Dear Escolano,

Thank you very much; it helped me.

Best regards,
Post Reply