Manage Route Port Modification (OnRouteEndPortModified)

An opening ID is an entry point used to customize business logic. The Manage Route Port Modification opening ID is available in the Piping/ Specification Resources resource set and is used to manage the end style whenever the connection or end style attribute is modified.

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 connection or end style attribute is modified, or when using the following commands:

  • Connect
  • Disconnect
  • Modify End Style
  • Copy End Style from Other End
  • Copy End Style to Other End

This opening ID is used to implement the required behavior after a modification of a connection or end style attribute.

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

Input Objects

Input objects must be of the following types:

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

Context Object Parameters

Parameter Name Type Read or Write Comments
FactType ProductOccurence — Type of ThisObject in the business rule body.
ActionPerformed String Read It can be "EndStyleModified" or "ConnectionModified" on the basis of context.
ModifyRoutePort1 PLMPort Read It is one of the ports of route. This value is NULL for flexible route.
ModifyRoutePort2 PLMPort Read It is the other port of route. This value is NULL for flexible route.
ObjectConnectedPort1 ProductOccurence Read The part connected to the ModifyRoutePort1 of the route.
ObjectConnectedPort2 ProductOccurence Read The part connected to the ModifyRoutePort2 of the route.
PortConnectedToPort1 PLMPort Read Port of the part that is connected to ModifyRoutePort1.
PortConnectedToPort2 PLMPort Read Port of the part that is connected to ModifyRoutePort2.
FlexibleCurve Feature Read It is the curve of flexible route. This value is NULL for rigid route.
FlexiblePoint1 Point Read It is one of the points on the flexible route. This value is NULL for rigid route.
FlexiblePoint2 Point Read It is the other point on the flexible route. This value is NULL for rigid route.
ExtremityType String Read It is a string that indicates in which node the action has been done. Its values can be: “Start”, “End”, “Both”.

Sample

//define the variable for the parameters
let ActionToBePerformed(String)
let RoutePLMPort1(PLMPort)
let RoutePLMPort2(PLMPort)
let ObjectConnToPort1(ProductOccurrence)
let ObjectConnToPort2(ProductOccurrence)
let PortConnToPort1(PLMPort)
let PortConnToPort2(PLMPort)

//define the other variables
let RigidPipeReference(Piping_Rigid_Pipe)
let FlexiblePipeReference(Piping_Flexible_Pipe)
let PipePort1(Piping_PipeXPort)
let PipePort2(Piping_PipeXPort)

let Description(String)

//set the variable from the parameters
set ActionToBePerformed = Parameters.GetAttributeString("ActionPerformed")
set RoutePLMPort1 = Parameters.GetAttributeObject("ModifyRoutePort1")
set RoutePLMPort2 = Parameters.GetAttributeObject("ModifyRoutePort2")
set ObjectConnToPort1 = Parameters.GetAttributeObject("ObjectConnectedPort1")
set ObjectConnToPort2 = Parameters.GetAttributeObject("ObjectConnectedPort2")
set PortConnToPort1 = Parameters.GetAttributeObject("PortConnectedToPort1")
set PortConnToPort2 = Parameters.GetAttributeObject("PortConnectedToPort1")

set flexCurve = Parameters.GetAttributeObject("FlexibleCurve")
set point1 = Parameters.GetAttributeObject("FlexiblePoint1")
set point2 = Parameters.GetAttributeObject("FlexiblePoint2")
set ActionOnNodeExtrimity = Parameters.GetAttributeString("ExtrimityType")


set RigidPipeReference = ThisObject.Reference
set PipePort1 = RoutePLMPort1
set PipePort2 = RoutePLMPort2

if(RigidPipeReference <> NULL)
{
	set Description = RigidPipeReference.V_Name + " | " + ActionToBePerformed + " | "
	if(PipePort1 <> NULL ) 	//route end style has been modified from the DIP
	{
		set Description = Description + PipePort1.V_EndStyle + "x" + PipePort2.V_EndStyle + " | "
		
		if(ObjectConnToPort1 <> NULL AND PortConnToPort1 <> NULL)
		{
			set Description = Description + ObjectConnToPort1.Name + "x" + PortConnToPort1.V_Name + " | "
		}		
		
	}
	if ( PipePort2 <> NULL )
	{
		set Description = Description + PipePort2.V_EndStyle + " | "
		if(ObjectConnToPort2 <> NULL AND PortConnToPort2 <> NULL)
		{
			set Description = Description + ObjectConnToPort2.Name + "x" + PortConnToPort2.V_Name
		}
	}
	RigidPipeReference.V_description = Description
	Notify(RigidPipeReference.V_description)
}

set FlexiblePipeReference = ThisObject.Reference

if(FlexiblePipeReference <> NULL)
{
	set Description = FlexiblePipeReference.V_Name + " | " + ActionToBePerformed + " | "
	
	if(point1 <> NULL)
	{
		Description = Description + "Point1" + " | "
		if(ObjectConnToPort1 <> NULL AND PortConnToPort1 <> NULL)
		{
			set Description = Description + ObjectConnToPort1.Name + "x" + PortConnToPort1.V_Name + " | "
		}
	}
	if ( point2 <> NULL )
	{
		Description = Description + "Point2" + " | "
		if(ObjectConnToPort2 <> NULL AND PortConnToPort2 <> NULL)
		{
			set Description = Description + ObjectConnToPort2.Name + "x" + PortConnToPort2.V_Name + " | "
		}
	}
	Description = Description + ActionOnNodeExtrimity
	Notify(FlexiblePipeReference.V_description)
}