Material Input and Output
 
Functions Introduced:
Material properties are frequently stored in text files accessible for repeated assignment to parts. Creo TOOLKIT includes functions that write to and read these files.
The function ProMaterialfileWrite() writes the information contained in a ProMaterial object to a file with the specified name.
The format of this file is the new material file format which is consistent with the materials library.
The function ProMaterialfileRead() reads from a material file, the properties of the material with the specified name. The name of the file read can be either:
<name>.mtl—Specifies a new material file format.
<name>.mat—Specifies an old material file format (pre-Wildfire 3.0).
If the material is not already in the part database, ProMaterialfileRead() adds the material to the database after reading the material file. If the material is already in the database, the function replaces the material properties in the database with those contained in the material file.
Example 5: Working with Materials and Material Properties
The sample code in UgMaterial.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_param shows how to work with materials and material properties.
Example 6: Creating a Non-linear Material
The sample code in UgSolidMaterial.c located at <creo_toolkit_loadpoint>/protk_appls/pt_userguide/ptu_solid shows how to create a non-linear material and assign it to a solid.
Est-ce que cela a été utile ?