Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
L2PPhysicalRoot | PLM Entity |
Read | The input physical root in which corresponding physical father element is to be searched. |
L2PPhysicalFather | PLM Entity | Write | The output physical product in which equipment is to be instantiated. If the business rule output L2PPhysicalFather is invalid, default behaviour will be applicable. |
Sample
The following sample illustrates how to find a correspondence between the instance name of a product and the Subtype attribute of a logical component. This correspondence enables to place the equipment under the aggregating product.
/* ThisObject = RFLVPMLogicalInstance */
let ChildtoplaceEQT (Feature)
let Listchild (List)
let PhysRoot (VPMReference)
let index (Integer)
let nbChild (Integer)
let Child (Feature)
let SubType(String)
let Feature(Feature)
set index = 1
PhysRoot = Parameters.GetAttributeObject("L2PPhysicalRoot")
Listchild = PhysRoot.Children
nbChild = Listchild->Size()
For index while index <= nbChild
{
set Child = Listchild->GetItem(index)
Feature = ThisObject.Reference
SubType = Feature.GetAttributeString("V_Ens_SubType")
if(Child.Name == SubType)
{
Parameters.SetAttributeObject("L2PPhysicalFather", Child)
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", " Physical Father Found " )
}
else
{
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", "Physical Father matching Logical Subtype / Physical Product Name not Found ")
}
}