Validate Segment-underlying Conductors Combination (EWR_ValidateRoutingAllConductorsInSegment)

An opening ID is an entry point used to customize business logic. The Validate segment-underlying conductors combination opening ID is available in the Electrical physical system design resources set and it is used to validate if segment-underlying conductor combination leads to segment overloading.

Warning: This business logic is deprecated. It will work for now but you should not use them for any new implementations. It is recommended to use EWR_ValidateSegmentInConductorRoute and EWR_ValidateConductorRoute.
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 the user confirms the conductor route definition in the Automatic Routing command. See Electrical 3D Design User's Guide: Routing Conductors: Routing Conductors Automatically.

Based on separation of conductors inside the segment, you can accept or reject routing of the conductor. This business rule can either:

  • validate the routing of all selected conductors with success (severity=0)
  • or validate the routing of all selected conductors with a warning in case the segment is heavily overloaded (severity=1)
  • or reject the routing of all conductors with an error, when routing selected conductors requires segment diameter more than present to accommodate the conductors (severity=2)

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: EWR_ValidateRoutingAllConductorsInSegment
Customization intent: Validation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Instance of the segment to add to the conductor route.
  • Parameters corresponds to the context object.
  • Validation: Output boolean variable to know if the validation succeeded or failed. If the output from is FALSE, then the conductors are not routed.
  • Severity information:
    • Severity= 0 the treatment is to be continued (no message).
    • Severity= 1 the treatment is to be continued and only a warning raised.
    • Severity= 2 the treatment is supposed to be undone (i.e. the route will be lost, even if the conductors are already routed).

Note: While creating input parameter (ListOfConductors), the result of the business rule EWRRouting_ValidateWireRoute will be taken into account.

Context Object Parameters

Parameter NameTypeRead/WriteComments
ListOfConductors (input)PLM Entity ReadList of all conductors routed through the segment.

Sample

The following sample explains how to use an opening ID to validate the routing of all the selected conductors through the segment.

/* CATRule signature (do not edit) : (ThisObject :
 #In Segment, Parameters : #In RuleContext, Validation : 
 #Out Boolean) : #Void */

Let ListConductors(LIST)
Let Conductor (Wire)
Let sMessage (STRING)
Let iSeverity (INTEGER)
Let index (INTEGER)
Let nbConductors (INTEGER)
Let ConductorDia (LENGTH)
Let TotalDia (LENGTH)
Let SegDia (LENGTH)
Let ratio (REAL)
Let SegName(String)

/* Initialize the parameters, by default success */
set Validation = true
set sMessage = ""
set iSeverity = 0

set index = 1
set SegDia = ThisObject.Elec_Diameter
SegName = ThisObject.Name
set ListConductors = Parameters.GetAttributeObject("ListOfLinkedWires")
if(NULL <> ListConductors)
{
   nbConductors = ListConductors.Size()
	  /* Initialize the output parameters as success, based on 
computation result these parameters will be reset*/
   Validation = true
	  iSeverity = 0
   sMessage = "All the wires could be accomodated in this segments"
   if(SegName == "A")
   {
      	if(2 < nbConductors)
         {
          Validation = false
          iSeverity = 2
          sMessage = "Error : Segment " + SegName + " is fatally 
  overloaded" 
         }
       else if(1 < nbConductors)
         {
          Validation = true
          iSeverity = 1
          sMessage = "Warning : Segment " + SegName + " is 
  overloaded"
          }
   }
}
 
 else /* No conductor is to be routed from this segment, so return 
 true */
{
  Validation = true 
  iSeverity = 0
  sMessage = "None of the conductors are to be routed from this 
segment"
}
     
Parameters.Message = sMessage
Parameters.Severity = iSeverity