General InformationThe table below provides you with information related to the definition of the opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample retrieves the Item reference to use for a given product.
let ThisRef(VPMReference)
let PrcsScopeList(List)
let PrcsOcc(MfgProcessOccurrence)
Let oMfgItemReference(DELFmiFunctionReference)
let tmpList(List)
set ThisRef = ThisObject.Reference
oMfgItemReference = NULL
if ThisRef.IsASortOf("Fastener")
{
/* Fastener case, we want to let the system handle the Fasten reference to use. */
oMfgItemReference = NULL
}
else
{
/* Other types of products, we handle assemblies and parts using the same logic. */
PrcsScopeList = GetProcessOfEachScope(ThisRef)
if (PrcsScopeList.Size() == 0)
{
/* OK, no process scoped found in session, looking in the database now - do not forget to export variable DELMIA_EBOM_IN_PRD*/
PrcsScopeList = ThisRef.NavigateFromPartOrPrdToProcessThroughScopeLink()
if (PrcsScopeList.Size() == 0)
{
/* Case where product isn't scoped at all. New reference must be created */
tmpList = ThisRef.Query("VPMReference","")
/*if (ThisRef.V_isTerminal) --> Method not valid with certain old data used for demos. */
if (tmpList.Size()==0)
{
/* Case where the product is a leaf node. Better method can be provided based on custom logic.*/
/* oMfgItemReference = new("Provide",ThisRef.V_Name,NULL)ElementaryEndItem */
oMfgItemReference = new("ElementaryEndItem",ThisRef.V_Name,NULL)
oMfgItemReference.CreateProductProcessScope(ThisRef)
}
else
{
/*We're sure it's an assembly. Here we could still create a provide or another specific type depending on customer requirement */
oMfgItemReference = new("CreateAssembly",ThisRef.V_Name,NULL)
oMfgItemReference.CreateProductProcessScope(ThisRef)
}
}
else
{
/* Case where product is already scoped by process in DB */
set oMfgItemReference = PrcsScopeList.GetItem(1)
}
}
else
{
/* Case where product is already scoped by process in session */
set oMfgItemReference = PrcsScopeList.GetItem(1)
}
}
Parameters.SetAttributeObject("oMfgItemReference" , oMfgItemReference)
SampleThe following sample retrieves the item reference to use for a given product or type.
let ThisRef(VPMReference)
let PrcsScopeList(List)
let PrcsOcc(MfgProcessOccurrence)
Let oMfgItemReference(DELFmiFunctionReference)
Let PartName(String)
oMfgItemReference = NULL
set ThisRef = ThisObject.Reference
PartName = ThisRef.V_Name
if (PartName == "P1")
{
PrcsScopeList = ThisRef.NavigateFromPartOrPrdToProcessThroughScopeLink()
set oMfgItemReference = PrcsScopeList.GetItem(1)
Parameters.SetAttributeObject("oMfgItemReference" , oMfgItemReference)
}
else
{
Parameters.SetAttributeString("oMfgItemType" , "ProcessContinuousProvide")
Parameters.SetAttributeInteger("oMfgItemMagnitude" , 4)
}
| |||||||||||||||||||||||||||||||||