Compute Corresponding Physical Element (L2P_ComputeCorrespondingPhysical)

An opening ID is an entry point used to customize business logic. The Compute corresponding physical element opening ID is available in the Logical to physical synchronization resources set and it is used to compute the logical element of a physical element for synchronization.

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 the Logical to Physical synchronization. For the selected elements, the Business Rule will compute the physical element corresponding to the input logical element in input logical context. The rule will be applicable only if no implement link is found for the logical elements (system, devices, and routables).

By default, if no implement link is found, logical elements will be considered as new elements and corresponding physical elements will be created.

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

PLM Opening ID: L2P_ComputeCorrespondingPhysical
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. Message attribute will be displayed in the synchronization report.

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 L2PPhysicalElement is invalid, the logical element will be treated as new element and the corresponding physical will be created.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalRootPLM Entity ReadThe input physical root in which the corresponding physical element is to be searched.
L2PPhysicalElementPLM Entity ReadThe output corresponding physical element.
L2PCreateImplementLinkBoolean WriteThe output Boolean, that should be set as TRUE, is an implement link that should be created during synchronization.
L2PCreateRefRefLinkBooleanWriteThis parameter is added to the rule if ThisObject is a system.

Moreover, the output is used only if an implement link is to be created, that is output L2PCreateImplementLink returns TRUE.

For more information, see Electrical 3D Design User's Guide: Synchronizing Physical Data with Logical Data: Synchronizing in an Intermediate Level.

Sample

The following sample illustrates how to find a correspondence between the instance name of a physical component and the Subtype attribute of logical component. This correspondence enables the creation of an implement link between the two components.

/* 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("L2PPhysicalElement", Child)
		Parameters.SetAttributeBoolean("L2PCreateImplementLink", true)
		Parameters.SetAttributeInteger("Severity", 1)
		Parameters.SetAttributeString("Message", " Corresponding Physical Found" )
		
	}
	else
	{
		Parameters.SetAttributeInteger("Severity", 1)
		Parameters.SetAttributeString("Message", " Physical  not Found ")
	}
}