Compute Aggregating Product of Equipment (L2P_ComputeFatherForPlacingEquipment)

An opening ID is an entry point used to customize business logic. The Compute aggregating product of equipment opening ID is available in the Logical to physical synchronization resources set and it is used to decide the aggregating product to place a logical element. This computation rule is triggered during the analysis of logical equipment which is to be created in physical.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked during analysis of logical equipment which is to be created in physical.

This opening ID is used during the Logical to Physical synchronization to decide the aggregating product in which equipment is to be placed during synchronization.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: L2P_ComputeFatherForPlacingEquipment
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: The logical element being analyzed for synchronization.
  • Parameters: corresponds to the context object. Standard context, Message attribute are displayed in the synchronization report.
  • Severity messages:
    • Severity messages: Severity= 0 the treatment is to be continued (no message).
    • Severity= 1 the treatment is to be continued and only a warning raised.
    • Severity= 2 the treatment is supposed to be undone.

    If the business rule output L2PPhysicalFather is invalid, the default behaviour is applicable.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalRootPLM Entity ReadThe input physical root in which corresponding physical father element is to be searched.
L2PPhysicalFatherPLM EntityWriteThe 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 ")
	}
}