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
<strong>let</strong> RigidPipeReference(Piping_Rigid_Pipe)
<strong>let</strong> FlexiblePipeReference(Piping_Flexible_Pipe)
<strong>let</strong> PipePort1(Piping_PipeXPort)
<strong>let</strong> PipePort2(Piping_PipeXPort)
<strong>let</strong> Description(String)
//set the variable from the parameters
<strong>set</strong> ActionToBePerformed = Parameters.GetAttributeString("ActionPerformed")
<strong>set</strong> RoutePLMPort1 = Parameters.GetAttributeObject("ModifyRoutePort1")
<strong>set</strong> RoutePLMPort2 = Parameters.GetAttributeObject("ModifyRoutePort2")
<strong>set</strong> ObjectConnToPort1 = Parameters.GetAttributeObject("ObjectConnectedPort1")
<strong>set</strong> ObjectConnToPort2 = Parameters.GetAttributeObject("ObjectConnectedPort2")
<strong>set</strong> PortConnToPort1 = Parameters.GetAttributeObject("PortConnectedToPort1")
<strong>set</strong> PortConnToPort2 = Parameters.GetAttributeObject("PortConnectedToPort1")
<strong>set</strong> flexCurve = Parameters.GetAttributeObject("FlexibleCurve")
<strong>set</strong> point1 = Parameters.GetAttributeObject("FlexiblePoint1")
<strong>set</strong> point2 = Parameters.GetAttributeObject("FlexiblePoint2")
<strong>set</strong> ActionOnNodeExtrimity = Parameters.GetAttributeString("ExtrimityType")
<strong>set</strong> RigidPipeReference = ThisObject.Reference
<strong>set</strong> PipePort1 = RoutePLMPort1
<strong>set</strong> PipePort2 = RoutePLMPort2
<strong>if</strong>(RigidPipeReference <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = RigidPipeReference.V_Name + " | " + ActionToBePerformed + " | "
<strong>if</strong>(PipePort1 <> NULL ) //route end style has been modified from the DIP
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + PipePort1.V_EndStyle + "x" + PipePort2.V_EndStyle + " | "
<strong>if</strong>(ObjectConnToPort1 <> NULL AND PortConnToPort1 <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + ObjectConnToPort1.Name + "x" + PortConnToPort1.V_Name + " | "
<strong>}</strong>
<strong>}</strong>
<strong>if</strong> ( PipePort2 <> NULL )
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + PipePort2.V_EndStyle + " | "
<strong>if</strong>(ObjectConnToPort2 <> NULL AND PortConnToPort2 <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + ObjectConnToPort2.Name + "x" + PortConnToPort2.V_Name
<strong>}</strong>
<strong>}</strong>
RigidPipeReference.V_description = Description
Notify(RigidPipeReference.V_description)
<strong>}</strong>
<strong>set</strong> FlexiblePipeReference = ThisObject.Reference
<strong>if</strong>(FlexiblePipeReference <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = FlexiblePipeReference.V_Name + " | " + ActionToBePerformed + " | "
<strong>if</strong>(point1 <> NULL)
<strong>{<!-- --></strong>
Description = Description + "Point1" + " | "
<strong>if</strong>(ObjectConnToPort1 <> NULL AND PortConnToPort1 <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + ObjectConnToPort1.Name + "x" + PortConnToPort1.V_Name + " | "
<strong>}</strong>
<strong>}</strong>
<strong>if</strong> ( point2 <> NULL )
<strong>{<!-- --></strong>
Description = Description + "Point2" + " | "
<strong>if</strong>(ObjectConnToPort2 <> NULL AND PortConnToPort2 <> NULL)
<strong>{<!-- --></strong>
<strong>set</strong> Description = Description + ObjectConnToPort2.Name + "x" + PortConnToPort2.V_Name + " | "
<strong>}</strong>
<strong>}</strong>
Description = Description + ActionOnNodeExtrimity
Notify(FlexiblePipeReference.V_description)
<strong>}</strong>
|
