Category Solids and parts, Object ProMaterialfile

Function ProMaterialfileRead


Description
Reads the named material properties from file and adds (or updates) the specified material name to the part's database.
Replacement in Object TOOLKIT: pfcPart::RetrieveMaterial
Synopsis
#include <ProMaterial.h>
ProErrorProMaterialfileRead(
ProSolid part
/* (In)
The part
*/
ProName matl_name
/* (In)
The name of the material properties (without the extension). The function will look for 'matl_name'.mtl (a modern material file) first, and then 'matl_name'.mat.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully read the material to the part.
PRO_TK_INVALID_TYPEThe model handle you passed to the function is not a part.
PRO_TK_GENERAL_ERRORThere is an error in the material properties file.
PRO_TK_E_NOT_FOUNDThe specifed file was not found on the drive.

Manual References:

  1. Core: Solids, Parts, and Materials: Material Input and Output

Sample Code References:

  1. pt_examples ( TestPartMaterial.c )
  2. pt_userguide ( UgMaterial.c )