Validate Conductor Routing (EWRRouting_ValidateWireRoute)

An opening ID is an entry point used to customize business logic. The Validate conductor routing opening ID is available in the Electrical physical system design resources set and it is used to check the compatibility of conductor to be routed through a set of segments.

Warning: This business logic is deprecated and you should not use it for any new implementations. It is recommended to use EWR_ValidateSegmentInConductorRoute and EWR_ValidateConductorRoute instead.
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 and Manual Routing commands. See Electrical 3D Design User's Guide: Routing Conductors.

This business rule is used to check the compatibility of the conductor to be routed and the set of segments to be routed through. The business rule can either:

  • validate the routing of conductor to segment (severity=0)
  • or validate the routing of conductor to segment with a warning computed from the rules context (severity=1). All messages are gathered in a single dialog box.
  • or forbid the routing of conductor to segment with a warning computed from the rules context (severity=2). All messages are gathered in a single dialog box.

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject: Conductor to route.
  • Parameters corresponds to the context object. The standard context and message attribute are displayed in a warning if the validation fails.
  • Validation: a variable to know if the validation succeeded of failed.
  • 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

Context Object Parameters

Parameter NameTypeRead/WriteComments
ListOfBundleSegments (input)PLM Entity ReadList of proposed segments for the conductor route.

Sample

The following sample explains how to use an opening ID to validate conductor routing.

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

let ListOfSeg(LIST)
let NbElem(INTEGER)
let Name(STRING)
let iSearch(INTEGER)
let iSearch2(INTEGER)
let SepCode(String)

set Name = ThisObject.Name
set SepCode = ThisObject.Elec_Sep_Code

if(SepCode == "Error")
{
   Validation = false
   Parameters.Severity = 2
   Parameters.Message = "Routing not allowed by 
    business rule"
}
else if(SepCode == "DefaultError")
{
   Validation = false
   Parameters.Severity = 2
}
else if(SepCode == "Warning")
{
   Validation = true
   Parameters.Severity = 1
   Parameters.Message = "Routing allowed with warning"
}
else if(SepCode == "DefaultWarn")
{
   Validation = true
   Parameters.Severity = 1
}
else
{
	  Validation = true
   Parameters.Severity = 0
   Parameters.Message = "Routing Allowed"
}