Validate Segment Connections (EHINetwork_ValidateSegmentConnection)

An opening ID is an entry point used to customize business logic. The Validates segment connections opening ID is available in the Electrical physical system design resources set and it is used to check the status of two segment ends and the attached text to display.

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 during Electrical 3D Design User's Guide: Using the Network Assistant when two connected segment extremities are electrically connected but they are not geometrically at same position.

This opening ID is used to either:

  • validate the segment extremity link (severity=0 or validation successful). No specific segment color nor 3D text are displayed.
  • validate the segment extremity link (severity=1 or 2 and validation failed). Specific segment color and 3D text are displayed from the business rules result. Text is retrieved from context.

In the output of the Business Rule, visualize the status of the segment extremity link:

  • Change the color of 3D line representing the segments connection.
  • Change the 3D text.

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject: FirstBundleSegmentExtremity
  • Parameters corresponds to the context object. Message attribute will be displayed in the 3D Text of analyze network if the validation fails.
  • Validation: a variable to know if the validation succeeded or failed.

Context Object Parameters

Parameter NameTypeRead/WriteComments
SecondBundleSegmentExtremity (input)PLM Entity ReadThe second extremity is electrically connected to first extremity.
FirstExtremityX (input) PLM Entity ReadFirst segment extremity X position (length relative to root).
FirstExtremityY (input) PLM Entity ReadFirst segment extremity Y position (length relative to root).
FirstExtremityZ (input) PLM Entity ReadFirst segment extremity Z position (length relative to root).
SecondExtremityX (input) PLM Entity ReadSecond segment extremity X position (length relative to root).
SecondExtremityY (input) PLM Entity ReadSecond segment extremity Y position (length relative to root).
SecondExtremityZ (input) PLM Entity ReadSecond segment extremity Z position (length relative to root).
SharedSupportAtConnectedExtrimity (input)PLM Entity ReadInstance of shared support section; null but when the 2 segment extremities are sharing a same support section instance (segment extremities ending to the same support section instance and connected).
FirstExtremityU (input) PLM Entity ReadFirst segment extremity U position in the shared support (length relative to support section origin), null if no shared support.
FirstExtremityV (input) PLM Entity ReadFirst segment extremity V position in the shared support (length relative to support section origin), null if no shared support.
SecondExtremityU (input) PLM Entity ReadSecond segment extremity U position in the shared support (length relative to support section origin), null if no shared support.
SecondExtremityV (input) PLM Entity ReadSecond segment extremity V position in the shared support (length relative to support section origin), null if no shared support.
Color (output string), 3D line color with possible values PLM Entity Read
  • G: Green
  • Y: Yellow
  • R: Red

Severity messages:

  • Severity= 0 the treatment is to be continued (no message)
  • Severity= 1 the treatment is to be continued and only a warning is raised
  • Severity= 2 Not used (idem severity=1)

Sample

The following sample explains how to use an opening ID to analyze network.

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

let X1(Length)
let Y1(Length)
let Z1(Length)

let X2(Length)
let Y2(Length)
let Z2(Length)

let U1(Length)
let U2(Length)

let V1(Length)
let V2(Length)

let bSupportShared(BOOLEAN)
let Support(Support)
let distance(Length)

set bSupportShared = false

Validation = true
Parameters.Severity = 0
Parameters.Message = "Valid connection"
Parameters.SetAttributeString("Color","G")

set X1 = Parameters.GetAttributeReal("FirstExtremityX")
set Y1 = Parameters.GetAttributeReal("FirstExtremityY")
set Z1 = Parameters.GetAttributeReal("FirstExtremityZ")

set X2 = Parameters.GetAttributeReal("SecondExtremityX")
set Y2 = Parameters.GetAttributeReal("SecondExtremityY")
set Z2 = Parameters.GetAttributeReal("SecondExtremityZ")

set U1 = Parameters.GetAttributeReal("FirstExtremityU")
set V1 = Parameters.GetAttributeReal("FirstExtremityV")

set U2 = Parameters.GetAttributeReal("SecondExtremityU")
set V2 = Parameters.GetAttributeReal("SecondExtremityV")

set Support = Parameters.GetAttributeObject
 ("SharedSupportAtConnectedExtremity")

if(Support <> NULL)
{
   distance = sqrt((U1 - U2)*(U1 - U2) + (V1 - V2)*
     (V1 - V2))
   set bSupportShared = true
}
else
{
   distance = sqrt(  (X1 - X2)*(X1 - X2) + (Y1 - Y2)*
    (Y1 - Y2) + (Z1 - Z2)*(Z1 - Z2)) 
}
if(false == bSupportShared)
{
   if(distance < 0.001)
   {
      Validation = true
      Parameters.Severity = 0
      Parameters.Message = "Valid connection, length 
       between point = " + ToString(distance)
      Parameters.SetAttributeString("Color","G")
   }
   else if(distance <= 0.01)
   {
      Validation = false
      Parameters.Severity = 1
      Parameters.Message = "Distant link: length between 
       point = " + ToString(distance)
      Parameters.SetAttributeString("Color","Y")
    }
    else
    {
      Validation = false
      Parameters.Severity = 2
      Parameters.Message = "Far distant link: length 
       between point = " + ToString(distance) 
      Parameters.SetAttributeString("Color","R")
    }
}
else
{
   if(distance < 0.001)
   {
      Validation = true
      Parameters.Severity = 0
      Parameters.Message = "Valid connection, length
       between point = " + ToString(distance)
      Parameters.SetAttributeString("Color","G")
   }
   else
   {
      Validation = false
      Parameters.Severity = 2
      Parameters.Message = "Distant link at shared
       support: length between point =
       " + ToString(distance) 
      Parameters.SetAttributeString("Color","R")
   }
}