Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
iMfgItemFatherReference
| Object | Read | Item reference that will be the father of the returned Item |
iListOfScopingMfgItems
|
List |
Read |
List of the Items' references scoping the product
or part on which the business logic is invoked. |
iMfgItemContext |
String |
Read |
Working context of the Item to use.
May be:
"Assembly"
"Fabrication"
"Service"
|
oMfgItemReference
|
Object |
Write |
Reference of the Item to use (may be
NULL ). |
oMfgItemType |
String |
Write |
Type of the Item to create, if a
oMfgItemReference is not returned.May
be:
"Provide" for Provided Part
"ElementaryEndItem" for Manufactured
Part
"CreateAssembly" for Assembly
"CreateMaterial" for Manufacturing
Material
"CreateKit" for Kit
"ProcessContinuousProvide" for Continuous
Provided Material
"ProcessContinuousCreateMaterial" for
Continuous Manufactured Material
|
oMfgItemMagnitude
|
Integer |
Write |
Magnitude of the Item to create, if a
oMfgItemReference is not returned.
Note:
Only required if the type is a sort of continuous.
May be:
0 : Each (not continuous item)
1 : Length
2 : Weight
3 : Surface
4 : Volume
|
oCreateScope |
Integer |
Write |
Specifies if a scope has to be created or not.
Note:
Only required if the business logic returns a type to
create.
May be:
0 : Does not create a scope
1 : Creates a scope
-1 : Applies the Create
Item-Product Scope on automatically created Provided
Part or Continuous Provided Material
option.
|
Sample
The following sample retrieves the Item reference to use for a given product from a list of
scoping Items.
Let ThisRef(VPMReference)
Let oMfgItemReference(DELFmiFunctionReference)
Let iMfgItemFatherReference(DELFmiFunctionReference)
Let iListOfScopingMfgItems(List)
Let oMfgItemType(String)
Let oMfgItemMagnitude(Integer)
Let iMfgItemContext(String)
Let NbOfScopingItems(Integer)
Let FatherDesc(String)
Let index(Integer)
Let ItemReference(DELFmiFunctionReference)
Let ItemDesc(String)
set ThisRef = ThisObject.Reference
oMfgItemReference = NULL
/*Read the scoping items */
set iListOfScopingMfgItems = Parameters->GetAttributeObject("iListOfScopingMfgItems")
set NbOfScopingItems = iListOfScopingMfgItems.Size()
Trace(1 , "NbOfScopingItems : ", NbOfScopingItems )
if (NbOfScopingItems > 0)
{
/* Read father item */
set iMfgItemFatherReference = Parameters->GetAttributeObject("iMfgItemFatherReference")
if (iMfgItemFatherReference <> NULL)
{
set FatherDesc = iMfgItemFatherReference->GetAttributeString("V_description")
Trace(1 , "FatherDesc : ", FatherDesc )
}
index = 0
for index while index < NbOfScopingItems
{
index = index+1
set ItemReference = iListOfScopingMfgItems.GetItem(index)
if (ItemReference <> NULL)
{
set ItemDesc = ItemReference->GetAttributeString("V_description")
Trace(1 , "ItemDesc : ", ItemDesc )
if (ItemDesc == FatherDesc)
{
set oMfgItemReference = ItemReference
}
}
}
}
Parameters.SetAttributeObject("oMfgItemReference" , oMfgItemReference)
if (oMfgItemReference == NULL)
{
Trace(1 , "oMfgItemType : ", oMfgItemType )
oMfgItemType = "Provide"
oMfgItemMagnitude = 0
Parameters.SetAttributeString("oMfgItemType" , oMfgItemType)
Parameters.SetAttributeInteger("oMfgItemMagnitude" , oMfgItemMagnitude)
}
}