All Frameworks  Object Hierarchy  This Framework  Indexes   

MaterialFamilies (Collection)

A collection of all the MaterialFamily objects.
This collection is currently managed by a CATIAMaterialDocument object.

Method Index

Add
Adds a new material family to the MaterialFamilies collection.
Item
Returns a material family from its index in the MaterialFamilies collection.
Remove
Removes a material family from the MaterialFamilies collection.

Methods


o Func Add() As
Adds a new material family to the MaterialFamilies collection.
Example:
The following adds a material family to the collection attached to a document. This document must be a MaterialDocument object.
 FileToOpen = "e:\users\ast\materials\Catalog.CATMaterial"
 Dim MyDocument As MaterialDocument
 Set MyDocument = Documents.Open(FileToOpen)
 Dim MyMaterialFamily As MaterialFamily
 Set MyMaterialFamily = MyDocument.MaterialFamilies.Add
 
o Func Item( iIndex) As
Returns a material family from its index in the MaterialFamilies collection.
Parameters:
iIndex
The index of the material family to retrieve in the collection of material families. Compared with other collections, you cannot use the name of the material family as argument.
Returns:
The retrieved material family
Example:
The following example returns in MyMaterialFamily the sixth material family in the collection.
 Dim MyMaterialFamily As MaterialFamily
 Set MyMaterialFamily = MaterialFamilies.Item(6)
 
o Sub Remove( iIndex)
Removes a material family from the MaterialFamilies collection.
Parameters:
iIndex
The index of the material family to remove. Compared with other collections, you cannot use the name of the material family as argument.
Example:
The following example removes the second material family in the collection attached to the active document. This document must be a
MaterialDocument object.
 FileToOpen = "e:\users\ast\materials\Catalog.CATMaterial"
 Dim MyDocument As MaterialDocument
 Set MyDocument = Documents.Open(FileToOpen)
 MyDocument.MaterialFamilies.Remove(2)
 

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