Compute Preferences to Merge Two Branches (EHIMerge_ComputeMergeBranchPreferences)

An opening ID is an entry point used to customize business logic. The Compute preferences to merge two branches opening ID is available in the Electrical physical system design resources resource set and it is used to customize the properties of two branches after a merge.

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 using Merge Branches.

This opening ID is used to customize the default behavior of the command by specifying attributes for the resulting branch of the merge.

DefinitionDescription
PLM Opening IDEHIMerge_ComputeMergeBranchPreferences
Customization intent Computation
Execution contextClient

Input Objects

Input objects must be of the following types:

  • ThisObject: Instance of the first branch to merge.
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead or WriteComments
FactTypeAny EKL typeType of ThisObject in the business rule body.
Branch2InstanceBranch

(input)

ReadInstance of the second branch to merge.
FirstBranchExtremitySegmentExtremity

(input)

ReadExtremity of the first branch to merge.
SecondBranchExtremitySegmentExtremity

(input)

ReadExtremity of the second branch to merge.
MergeSegmentsInteger

(output)

WriteEnables to merge the two segments positioned next to the merge point.
RemoveLocalSlackInteger

(output)

WriteEnables to remove the local slack defined on the merge part.

Sample

The following sample illustrates how to enable the merge of two segments based on the segregation attribute of their branches.

Let ExtOfThisBranch(SegmentExtremity)
Let ExtOfSecondBranch(SegmentExtremity)
Let SegOfThisBranch(Segment)
Let SegOfSecondBranch(Segment)
Let SegregOfSegofThisBranch(String)

Set ExtOfThisBranch = Parameters.GetAttributeObject("FirstBranchExtremity")
Set ExtOfSecondBranch = Parameters.GetAttributeObject("SecondBranchExtremity")


Set SegOfThisBranch = ExtOfThisBranch.Owner
Set SegOfSecondBranch = ExtOfSecondBranch.Owner

Set SegregOfSegofThisBranch = SeOfgThisBranch.Elec_Segreg


if(SegregOfSegofThisBranch  == SegOfSecondBranch.Elec_Segreg AND SegregOfSegofThisBranch == "HT")
{
	Parameters.SetAttributeInteger("MergeSegments", 1)
}
else
{
	Parameters.SetAttributeInteger("MergeSegments", 0)
}