Introduction
Usage :
- provides the opening through Business Rule to the user whenever a route extremity is changed (connected/disconnected) in schematics
- allow user to keep routable extremities information through a Business Rule. User may copy the information on some custom attributes.
Datasetup Resource Set :
- Diagram Resource
Datasetup Resource : Schematic Callback Route Extremity Modified
Rule Example 1
Description
In the sample rule below, the instance name of extremities (connected components) is copied on V_description attribute of routable instance like Extremity1Name , Extremity2Name
NULL is copied in case extremity is NULL
Rule
/* Rule created by h66 9/8/2021 */ let RoutableOcc(LogicalOccurrence) let ListExtrmitiesOcc(LIST) set RoutableOcc = ThisObject set ListExtrmitiesOcc = Parameters.GetAttributeObject("List_Extremities_Components") let RoutableIns(RFLVPMLogicalInstance) set RoutableIns = RoutableOcc.Instance Let String_Description(String) Set String_Description = "" Let i = 1 Let isize = 0 set isize = ListExtrmitiesOcc->Size() let ExtremityOcc(LogicalOccurrence) if(NULL <> RoutableIns) { for i while i<=isize { set ExtremityOcc = ListExtrmitiesOcc->GetItem(i) if(NULL <> ExtremityOcc) { Let InstanceObject(RFLVPMLogicalInstance) set InstanceObject = ExtremityOcc.Instance Let InstanceName(String) set InstanceName = InstanceObject.PLM_ExternalID if (i == isize) set String_Description = String_Description + InstanceName else set String_Description = String_Description + InstanceName + ", " } else { if (i == isize) set String_Description = String_Description + "NULL" else set String_Description = String_Description + "NULL, " } } RoutableIns.SetAttributeString("V_description",String_Description)