All Frameworks  Class Hierarchy  This Framework  Indexes

Material Global Function CreateNewMaterial


int CreateNewMaterial( const CATUnicodeString& iName,
CATDocument* iMatDocument,
CATIMaterialFeature** oMaterial)
Creates a new material in a material catalog document.
Role: This method creates a new material and after the creation, the new material should be set in a family using the CATIFamilyFeature.SetMaterial method.
Parameters:
iName
The name of the material to create.
iMatDocument
The material catalog document (such document is stored in a file suffixed by CATMaterial) in which the material will be created.
oMaterial
The material object created.
Returns:
An integer value.
Legal values:
0
The material has been successfully created in the catalog
1
The material has been successfully created in the catalog but has been renamed to avoid name conflict
-1
A wrong or missing material name has been detected
-2
A wrong or missing document argument has been detected
-5
The material factories are not found

This object is included in the file: CATMaterialServices.h

Copyright © 2003, Dassault Systèmes. All rights reserved.