Rule to Get Replace Information in Component Groups (Schematic_GetInfoAboutReplace)

An opening ID is an entry point used to customize business logic. The Schematic_GetInfoAboutReplace opening ID lets you manage the replacement information during component group replacement.

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 when you replace a group of components with the Schematic_ComputeOptionsForComponentGroup opening ID.

Definition Description
PLM Opening ID Schematic_GetInfoAboutReplace
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: NULL
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
Input_ListOfOccurrencesToBeReplaced (Input) List Read List of logical occurrences instantiated from the group of components to replace.
Input_List_ListOfPorts (Input) List Read List of ports corresponding to each occurrence to replace.
Input_List_ListOfCompatibleOccurrences (Input) List Read List of compatible occurrences from the current design corresponding to each occurrence to replace.
Output_ListOfFilteredOccurrences (Output) List Write List of compatible elements corresponding to each occurrence to replace.
Output_List_ListOfPorts (Output) List Write List of ports from the filtered occurrences.
Notes:
  • If the rule returns ports, the symbol and ports are mapped and connected.
  • If the rule does not return ports, the corresponding ports are automatically detected based on their name. If the port detection is successful, the symbol and ports are mapped and connected. If the port detection fails, the symbol is mapped but the ports are unmapped and unconnected.
  • If the rule returns incorrect ports, the symbol is mapped but the ports remain unmapped and unconnected.
  • Ports that are already connected are considered as incompatible and will not be returned by the rule.

Sample

The following example shows how to manage the replace information during component group replacement.

/* Rule created by GKI3 5/22/2019 */ 

let ListOfOccurrencesToBeReplaced(LIST)
let ListOfListOfPorts(LIST)
let ListOfListOfCompatibleOccurrences(LIST)
let OutputListOfFilteredOccr(LIST)
let OutputListOfListOfPOrts(List)

set ListOfOccurrencesToBeReplaced = Parameters.GetAttributeObject("Input_ListOfOccurrencesToBeReplaced")

set ListOfListOfPorts = Parameters.GetAttributeObject("Input_List_ListOfPorts")
set ListOfListOfCompatibleOccurrences = Parameters.GetAttributeObject("Input_List_ListOfCompatibleOccurrences")

Let nOccurSize = 0
Let nPortListOfListSize = 0
Let nCompListOfListSize = 0 
set nOccurSize = ListOfOccurrencesToBeReplaced->Size()
set nPortListOfListSize = ListOfListOfPorts->Size()
set nCompListOfListSize = ListOfListOfCompatibleOccurrences->Size()

Let idx = 1
for idx while idx <= nOccurSize
{
	Let InputOccurObject(LogicalOccurrence)
	Let InputRefObject(RFLVPMLogicalReference)	
	Let ListOfCompatibleOccurrences(LIST)	
	Let ListOfPorts(LIST)
	Let sDescOfInputObject(String)
	Let nCompOccSizeList = 0 
	
	set InputOccurObject = ListOfOccurrencesToBeReplaced->GetItem(idx)	
	set ListOfCompatibleOccurrences = ListOfListOfCompatibleOccurrences.GetItem(idx)
	set ListOfPorts = ListOfListOfPorts.GetItem(idx)
	set InputRefObject = InputOccurObject.Reference
	set sDescOfInputObject = InputRefObject.V_description	
	set nCompOccSizeList = ListOfCompatibleOccurrences->Size()
	
	Let idxOccr =1
	for idxOccr while idxOccr <= nCompOccSizeList
	{
		Let OccurObject(LogicalOccurrence)
		Let InstObject(RFLVPMLogicalInstance)
		Let sInstanceDescOfCompatibleObject(String)
		
		set OccurObject = ListOfCompatibleOccurrences.GetItem(idxOccr)
		set InstObject = OccurObject.Instance
		set sInstanceDescOfCompatibleObject = InstObject.V_description
		
		if( sDescOfInputObject == sInstanceDescOfCompatibleObject)
		{
			OutputListOfFilteredOccr.Append(OccurObject)	
			break			
		}		
	}	
}

Parameters.SetAttributeObject("Output_ListOfFilteredOccurrences", OutputListOfFilteredOccr)
Parameters.SetAttributeObject("Output_List_ListOfPorts", OutputListOfListOfPOrts)