EKL - Manage Route Port Modification

Introduction

Avaibility : 25xFD01 

Usage : For Pipes, duct, tray, rigid & flexible 

  • It may happen that the end style  of the route is altered/changed and then becomes not compatible anymore wit hthe connected component. Therefore, action has to be taken on this change.
  • provides a new Opening ID for Business Rule for the user to implement the required behavior on the change of the End style or end modification
  • The Opening ID is also called for the commands like Connect/Disconnect, Modify End Style, Copy End Style from the other end, the edition of end style from the Data Information Panel (DIP)

Datasetup Resource Set : 

  • Piping/Tubing Specification Resources

Datasetup Resource : Manage Route Port Modification

 

Rule Example

rule1 : To check whether on change of the end style of the route from Data Information Panel, all the inputs are retrieved and accordingly description is set.

//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)
}