MfgAssembly (Object)

This Interface represents a Manufacturing Assembly.
Role: It gives access to the C++ DNBIMfgAssembly interface methods Such as
Example:
This example fetches an instance of a Manufacturing Assembly from a selected Activity
 Dim myActivity As Activity
 myActivity = 
 Dim myItem As Item
 Set myItem = myActivity.Items.Item(1)
 Dim obj As MfgAssembly
 Set obj = mySel.FindObject("DNBIAMfgAssembly")
 

Properties


Property Count() As (Read Only)
Returns the number of assigned Parts (can be fetched via ).
Example:
This example fetches the Number of assigned Parts of a Manufacturing Assembly
 Dim Number As Long
 Number = obj.Count
 
Property MAName() As
Returns or sets the Name of the Manufacturing Assembly. Name of the AST Manufacturing Assembly cannot be set/changed
Example:
This example fetches the Name of a Manufacturing Assembly
 Dim myName As String
 myName = obj.MAName
 
This example sets the Name of a Manufacturing Assembly
 Dim newName As String
 newName = "NewMAName"
 obj.MAName = newName
 
Property MAPartNumber() As
Returns or sets the Part Number of the Manufacturing Assembly. Part Number of the AST MA cannot be set/changed
Example:
This example fetches the Part Number of a Manufacturing Assembly
 Dim myPart As String
 myPart = obj.MAPartNumber
 
This example sets the Part Number of a Manufacturing Assembly
 Dim newPartNbr As String
 newPartNbr = "NewMAPartNumber"
 obj.MAPartNumber = newPartNbr
 
Property MAType() As (Read Only)
Returns the Type of the Manufacturing Assembly. It will be either a manufacturingAssembly or a manufacturingKit defined in
Example:
This example fetches the Type of a Manufacturing Assembly
 Dim MAtype As String
 If obj.MAType = manufacturingAssembly Then
   MAtype = "Manufacturing Assembly"
 Else
   MAtype = "Manufacturing Kit"
 End If
 

Methods


Sub AddPart( iItem)
Assignes a part (Product, Resource or other MA/MK) to the Manufacturing Assembly. No part can be assigned to AST MA
Parameters:
iItem
The item to be assigned
Example:
This example adds a product to the assigned Parts of a Manufacturing Assembly
 Dim myProducts As PPRProducts
 Set myProducts = DELMIA.ActiveDocument.PPRDocument.Products
 Dim Part As Item
 Set Part = myProducts.Item(2)
 obj.AddPart(Part)
 
Func Item( iIndex) As
Returns one assigned Part (Product, Resource or other MA/MK) of the Manufacturing Assembly.
Parameters:
iIndex
The index to the item to be returned
Returns:
The assigned item
Example:
This example cycles through the list of assigned Parts of a Manufacturing Assembly
 Dim j As Long
 For j = 1 To obj.Count
   Dim it As Item
   Set it = obj.Item(j)
   Dim ItemName As String
   ItemName = it.Name
 Next
 
Sub RemovePart( iItem)
Removes a part (Product, Resource or other MA/MK) from the Manufacturing Assembly. No part can be removed from AST MA
Parameters:
iItem
The item to be removed
Example:
This example removes a product from the assigned Parts of a Manufacturing Assembly
 Dim myProducts As PPRProducts
 Set myProducts = DELMIA.ActiveDocument.PPRDocument.Products
 Dim Part As Item
 Set Part = myProducts.Item(2)
 obj.RemovePart(Part)