Library | Module

Interface IpfcPart



Description

This class defines the material data for a part.
Direct Parent Classes:
IpfcSolid



Property Summary

PropertyCurrentMaterialas IpfcMaterial [optional]
The part material



Method Summary

FunctionCreateMaterial (Name as String) as IpfcMaterial
Creates a material of the specified name (with default values) in the part.
FunctionGetMaterial (Name as String) as IpfcMaterial [optional]
Locates a material by name.
FunctionListMaterials () as IpfcMaterials
Lists the materials that exist in the part.
FunctionRetrieveMaterial (FileName as String) as IpfcMaterial
Reads the named material properties from file and adds (or updates) the specified material name to the part's database.



Property Detail


PropertyCurrentMaterialas IpfcMaterial [optional]

The part material

By default, assigning a material to a sheetmetal part through IpfcPart.CurrentMaterial modifies the values of the sheetmetal properties such as Y factor and/or bend table as per the material file definition. This triggers a regeneration and a modification of the developed length calculations of the sheetmetal part. However, you can avoid this behavior by setting the value of the config option "material_update_smt_bend_table" to "never_replace".





Method Detail


FunctionCreateMaterial (Name as String) as IpfcMaterial

Creates a material of the specified name (with default values) in the part.

Exceptions thrown (but not limited to):

IpfcXToolkitFound - The material name already exists.


Parameters:
Name
The material name
Returns:
The new material



FunctionGetMaterial (Name as String) as IpfcMaterial [optional]

Locates a material by name.

The material must be stored in the part and not stored in an external file.
See Also:
IpfcPart.RetrieveMaterial(), IpfcPart.ListMaterials()
Parameters:
Name
The name of the material to find.
Returns:
The material object, or null, if the material was not found.



FunctionListMaterials () as IpfcMaterials

Lists the materials that exist in the part.
Returns:
The list of materials



FunctionRetrieveMaterial (FileName as String) as IpfcMaterial

Reads the named material properties from file and adds (or updates) the specified material name to the part's database.

Exceptions thrown (but not limited to):

IpfcXToolkitInvalidType - The model handle you passed to the function is not a part.

IpfcXToolkitNotFound - The specifed file was not found on the drive.


Parameters:
FileName
The name of the material file. The method will look for'matl_name'.mtl (a modern material file) first, and then 'matl_name'.mat.
Returns:
The material properties