Role: It gives access to the C++ DNBIMfgAssemblyFactory interface methods Such as
- Creates a manufacturing assembly
- Example:
-
This example fetches an instance of a Manufacturing Assembly factory in a a active document and then creates a manufactring assembly
Dim objMAfact As MfgAssemblyFactory Set objMAfact = CATIA.ActiveDocument.GetItem("MfgAssemblyFactory")
Methods
- Func CreateMfgAssembly( iNameBSTR, iPartNumberBSTR, iType) As
-
Creates a manufacturing assembly of given type "iType". This API cannot be used to create a Manufacturing Assembly of type AST(assemblySpecTree) or Manufacturing Output(manufacturingOutput)
- Parameters:
-
- iNameBSTR
- Name of the manufacturing assembly dd>
- iPartNumberBSTR
- Part-number of the manufacturing assembly dd>
- iType
- Type of the Manufacturing Assembly. If its value is "notSpecified" (or 4), the new assembly created will be of type "manufacturingAssembly" dd>
- oMfgAssembly
- Handler of the Manufacturing Assembly created
- Example:
-
This example creates a Manufacturing Assembly of type "manufacturingKit" having MAName as "MKit1" and part-number as "Kit1"
Dim matype As DNBIAMfgAssemblyType matype=manufacturingKit Dim MA As MfgAssembly (Or Dim MA As item) objMAfact.CreateMfgAssembly "MKit1","Kit1",matype,MA where objMAfact is a instance of Automation Interface for Manufacturing Assembly as shown earlier
- 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 nbMfgAssemblies
- Sub GetNumberofALLMfgAssy( iType, oNumOfMfgAssemblies)
-
Get the number of Manufacturing Assemblies(MA) of given type in MA Applicative Container
- Parameters:
-
- iType
- Type of MA to be considered. If its value is "notSpecified" (or 4), all the MAs will be considered dd>
- oNumOfMfgAssemblies
- Number of MAs found
- Example:
-
For example getting the number of MA of type "manufacturingKit" and displaying them in the Message Box.
Dim matype As DNBIAMfgAssemblyType matype=manufacturingKit Dim nbMfgAssemblies objMAfact.GetNumberofALLMfgAssy matype,nbMfgAssemblies MsgBox nbMfgAssemblies
- Sub RemoveMfgAssembly( iMfgAssembly)
-
Removes 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) objMAfact.RemoveMfgAssembly mfgAssy
- Sub RetrieveMfgAssembly( iNameBSTR, oMfgAssemblies, oNumOfMfgAssemblies)
-
Retrieve all the Manufacturing Assemblies of a given name.
- Parameters:
-
- iNameBSTR
- Name of the manufacturing assembly dd>
- oMfgAssemblies
- Array of the Items of the type "MfgAssembly". Array need to be allocated before passing. In case, if the size allocated is found to be less than the actual number of Manufacturing Assemblies found, the number of MAs returned will be equal to size of array passed only dd>
- oNumOfMfgAssemblies
- Number of MAs found with the given name. If the actual number of MAs found is greater than the size of the array passed, then value returned 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 objMAfact.RetrieveMfgAssembly "MA_TYPE1",MAList,NbMA MsgBox NbMA
- Func RetrieveMfgAssemblyAtIndex( iIndex) As
-
Retrieves a Manufacturing Assembly at the given index from the MA Applicative Container.
- Parameters:
-
- iIndex
- Index dd>
- 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
- Sub RetriveALLMfgAssy( iType, oAllMAs, oNumOfMfgAssemblies)
-
Retrieve all the Manufacturing Assemblies of a given type.
- Parameters:
-
- iType
- Type of manufacturing assemblies to be retrieved. If its value is "notSpecified" (or 4), all the manufacturing assemblies will be returned dd>
- oMfgAssemblies
- Array of the Items of the type "MfgAssembly". Array need to be allocated before passing. In case, if the size allocated is found to be less than the actual number of Manufacturing Assemblies found, the number of MAs returned will be equal to size of array passed only dd>
- oNumOfMfgAssemblies
- Number of MAs found. If the actual number of MAs found is greater than the size of the array passed, then value returned will be equal to the size of the array itself.
- Example:
-
For example: Code for retriving all the MAs of type "manufacturingKit" from the MA Applicative Container
Dim matype As DNBIAMfgAssemblyType matype=manufacturingKit Dim nbMfgAssemblies objMAfact.GetNumberofALLMfgAssy matype,nbMfgAssemblies Dim MAList() As AnyObject ReDim MAList(nbMfgAssemblies) Dim NbMA objMAfact.RetriveALLMfgAssy matype,MAList,NbMA