All Frameworks  Object Hierarchy  This Framework  Indexes   

MfgAssemblyFactory (Object)

Represents the factory to creates a manufacturing assembly.

Role: It gives access to the C++ DNBIMfgAssemblyFactory interface methods Such as
Example:
This example fetches an instance of a Manufacturing Assembly factory in a a active document and then creates a manufactring assembly
 Dim MAfactory As MfgAssemblyFactory
 Set MAfactory =  CATIA.ActiveDocument.GetItem("MfgAssemblyFactory")
 

Method Index

CreateMfgAssembly
Creates the created manufacturing assembly.
GetNumberOfMfgAssemblies
Get the number of Manufacturing Assemblies in MA Applicative Container
RemoveMfgAssembly
Remove a given Manufacturing Assembly from the MA Applicative Container.
RetrieveMfgAssemblyAtIndex
Retrieve a Manufacturing Assembly at the given index from the MA Applicative Container.
RetrieveMfgAssembly
Retrieve all the Manufacturing Assemblies of a given name.

Methods


o Func CreateMfgAssembly() As
Creates the created manufacturing assembly. It will be a manufacturingAssembly defined in MfgAssembly
Parameters:
opMfgAssembly
The item represented as manufacturing assembly to be assigned
Example:
This example creates a Manufacturing Assembly
 Dim MA As MfgAssembly (Or Dim MA As item)
 MAfactory.CreatesMfgAssembly MA
		where objMAfact is a instance of Automation Interface for Manufacturing Assembly as shown earlier
 
o Func GetNumberOfMfgAssemblies() As
Get the number of Manufacturing Assemblies in MA Applicative Container
Parameters:
oNumOfMfgAssemblies
number of Manufacturing Assemblies in MA Applicative Container
Example:
For example getting the number of Manufacturing assemblies and displaying them in the Message Box.
 Dim nbMfgAssemblies 
 Set nbMfgAssemblies =  objMAfact.GetNumberOfMfgAssemblies
 MsgBox  NbMA
 
o Sub RemoveMfgAssembly( iMfgAssembly)
Remove a given Manufacturing Assembly from the MA Applicative Container. Please note that the AST MA cannot be removed
Parameters:
iMfgAssembly
Manufacturing assembly to be removed or deleted
Example:
For example deleting the first MA from the Applicative Container
 Dim mfgAssy As Item
 Set mfgAssy =  objMAfact.RetrieveMfgAssemblyAtIndex(1)
 objMA.RemoveMfgAssembly mfgAssy
 
o Func RetrieveMfgAssemblyAtIndex( iIndex) As
Retrieve a Manufacturing Assembly at the given index from the MA Applicative Container.
Parameters:
iIndex
Index
oItem
Manufacturing Assembly at the above Index
Example:
For example retriving all the MAs from the Applicative Container
 Dim nbMfgAssemblies 
 Set nbMfgAssemblies =  objMAfact.GetNumberOfMfgAssemblies
 For II = 0 to MyNum-1
   Dim mfgAssy As Item
    Set mfgAssy =  objMAfact.RetrieveMfgAssemblyAtIndex(II)
	Next
 
o Sub RetrieveMfgAssembly( iNameBSTR,
oMfgAssemblies,
oNumOfMfgAssemblies)
Retrieve all the Manufacturing Assemblies of a given name.
Parameters:
iNameBSTR
Name of the manufacturing assembly
oMfgAssemblies
Array of the Items of the type MfgAssembly of Items. Please not the client has to set the appropriate size of this Array If the size is underestimated, that much size array will be returned.
oNumOfMfgAssemblies
Number of MAs found with the given name. If the actual number of MA found with this name is greater than the size of the array passed, then value will be equal to the size of the array itself.
Example:
For example retriving all the MAs with the name "MA_TYPE1" from the MA Applicative Container
 Dim nbMfgAssemblies 
 Set nbMfgAssemblies =  objMAfact.GetNumberOfMfgAssemblies
 Dim MAList() As AnyObject
 ReDim MAList(nbMfgAssemblies-1)
 Dim NbMA 
 objMA.RetrieveMfgAssembly "MA_TYPE1",MAList,NbMA
 MsgBox  NbMA
 

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