Indexes   

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")
 

Property Index

Count
Returns the number of assigned Parts (can be fetched via
MAName
Returns or sets the Name of the Manufacturing Assembly.
MAPartNumber
Returns or sets the Part Number of the Manufacturing Assembly.
MAType
Returns the Type of the Manufacturing Assembly.

Method Index

AddPart
Assignes a part (Product, Resource or other MA/MK) to the Manufacturing Assembly.
Item
Returns one assigned Part (Product, Resource or other MA/MK) of the Manufacturing Assembly.
RemovePart
Removes a part (Product, Resource or other MA/MK) from the Manufacturing Assembly.

Properties


o Property Count() As (Read Only)
Returns the number of assigned Parts (can be fetched via Item ).
Example:
This example fetches the Number of assigned Parts of a Manufacturing Assembly
 Dim Number As Long
 Number = obj.Count
 
o 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
 
o 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
 
o Property MAType() As (Read Only)
Returns the Type of the Manufacturing Assembly. It will be either a manufacturingAssembly or a manufacturingKit defined in DNBIAMfgAssemblyType
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


o 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)
 
o 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
 
o 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)
 

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