Introduction
Usage : involved when placing components group with "replace" operation when using the other BR the Schematic_ComputeOptionsForComponentGroup.
In this case it allows to manage the replacement information during component group replacement.
Datasetup Resource Set :
- Diagram Resource
Datasetup Resource : Rule to Get Replace Information in Component Groups
Rule Example 1
Description
Rule
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)3DXML
