Rule to Compute Options for Component Groups (Schematic_ComputeOptionsForComponentGroup)

An opening ID is an entry point used to customize business logic. The Schematic_ComputeOptionsForComponentGroup opening ID lets you instantiate, duplicate, or replace the objects from a group of components.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when you use a group of components from the catalog.

Definition Description
PLM Opening ID Schematic_ComputeOptionsForComponentGroup
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

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

Context Object Parameters

Parameter Name Type Read or Write Comments
List_Instances_From_ComponentGroup (Input) List Read List of PLM instances from the group of components.
List_Operations (Output) List Write

List of operations applied for each instance from the input list.

This list contains integer values:

  • 1 = Instantiate
  • 2 = Duplicate
  • 3 = Replace
Note: Routable objects are never replaced. If the rule indicates replace, the routable objects are instantiated.

Sample

The following example shows how to compute options for a group of components.

/* Rule created by H66 4/10/2019 */ 

       let ListPLMInstances(LIST)

       set ListPLMInstances = Parameters.GetAttributeObject ("List_Instances_From_ComponentGroup")

       let OutListOfOperations(List)

       Let ReferenceObject(RFLVPMLogicalReference)
       Let InstanceObject(RFLVPMLogicalInstance)
       let sDiscipline (String)

       Let j = 1
       for j while j<=ListPLMInstances->Size()
       {
         set InstanceObject = ListPLMInstances->GetItem(j)
         set ReferenceObject = InstanceObject.Reference
         sDiscipline = ReferenceObject.V_discipline
         if(sDiscipline == "EnsLogicalEquipment")
         {
            OutListOfOperations.Append(3) /*Replace*/
         }
         else  if(sDiscipline == "Piping_Logical_Part")
         {
            OutListOfOperations.Append(2)
         }
         else
         {
             OutListOfOperations.Append(1)
         }
         j = j+1
       }
 /* output parameters write */
Parameters.SetAttributeObject("List_Operations", OutListOfOperations)