Rule to Keep Information on Connected Components (SchematicCallback_ComponentsConectivityModified)

An opening ID is an entry point used to customize business logic. The SchematicCallback_ComponentsConectivityModified allows you to keep tracks of connected components.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when:

  • A component is connected to another component
  • A component is disconnected from another component
  • A connected component is deleted

Definition Description
PLM Opening ID SchematicCallback_ComponentsConectivityModified
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Logical Occurrence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
FactType Logical Occurrence Read Checks the components connected to a logical component and add the name of the connected component in the Description field of the logical component.

Equipment Connected to Nozzles

The following example, an equipment is connected to two nozzles.

The rule is triggered when connecting the three components.

Notify("Rule Triggered")

Let ThisInstanceObject(RFLVPMLogicalInstance)
set ThisInstanceObject = ThisObject.Instance

Let TargetOccurrence(LogicalOccurrence)
set TargetOccurrence = Parameters.GetAttributeObject("Target_Component_Occ")

Let bOperation(Boolean)
set bOperation = Parameters.GetAttributeBoolean("Connect_Case")

Let TargetInstanceObject(RFLVPMLogicalInstance)
set TargetInstanceObject = TargetOccurrence.Instance

let SourceName(String)
set SourceName = ThisInstanceObject.PLM_ExternalID

let TargetName(String)
set TargetName = TargetInstanceObject.PLM_ExternalID

let SourceDes(String)
set SourceDes = ThisInstanceObject.V_description

let TargetDes(String)
set TargetDes = TargetInstanceObject.V_description

if(bOperation == true )
{
	if(SourceDes.Length() == 0)
		SourceDes = SourceDes + TargetName
	else
		SourceDes = SourceDes + ";" + TargetName

	if(TargetDes.Length() == 0)
		TargetDes = TargetDes + SourceName
	else
		TargetDes = TargetDes + ";" + SourceName

	Notify("Connect case")
}
else
{
	let returnedIndex(integer)
	returnedIndex = SourceDes.Search(TargetName,0,true)

	if(returnedIndex <> -1)
	{
		let SrcResultingStr(String)
		set SrcResultingStr = ReplaceSubText(SourceDes,";" + TargetName,"")
		
		if(SrcResultingStr == SourceDes)
		{
			let SrcResultingStr1(String)
			SrcResultingStr1 = ReplaceSubText(SourceDes,TargetName+";","")
			
			if(SrcResultingStr1 == SourceDes)
			{
				let SrcResultingStr2(String)
				SrcResultingStr2 = ReplaceSubText(SourceDes,TargetName,"")
				SourceDes = SrcResultingStr2
			}
			else
				SourceDes = SrcResultingStr1
		}
		else
			SourceDes = SrcResultingStr	
	}

	returnedIndex = TargetDes.Search(SourceName,0,true)

	if(returnedIndex <> -1)
	{
		let TrgtResultingStr(String)
		set TrgtResultingStr = ReplaceSubText(TargetDes,";"+SourceName,"")
		
		if(TrgtResultingStr == TargetDes)
		{
			let TrgtResultingStr1(String)
			TrgtResultingStr1 = ReplaceSubText(TargetDes,SourceName+";","")
			
			if(TrgtResultingStr1 == TargetDes)
			{
				let TrgtResultingStr2(String)
				TrgtResultingStr2 = ReplaceSubText(TargetDes,SourceName,"")
				TargetDes = TrgtResultingStr2
			}
			else
				TargetDes = TrgtResultingStr1
		}
		else	
			TargetDes = TrgtResultingStr
	}

	Notify("Disconnect case")
}

ThisInstanceObject.SetAttributeString("V_description", SourceDes)
TargetInstanceObject.SetAttributeString("V_description", TargetDes)

The description attributes are updated with the instance names of the connected components.

If the equipment is disconnected from one of the nozzles, the Description attribute is updated.