Validate Target Support Compatibility (EHI_ValidateTargetSupportCompatibilityForCopyArrangement)

An opening ID is an entry point used to customize business logic. The Validate target support compatibility opening ID validates the target support for the copy arrangement of the segments.

This opening ID is available in the Electrical physical system design resources resource set.

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 using the Copy Arrangement command. For more information, see Electrical 3D Design: Arranging Segments: Copying Arrangement between Supports .

The purpose of this opening ID is to check that Copy Arrangement is allowed on the selected source and target support pair.

It can either:

  • Validate the copying of arrangement on the target support (severity = 0)
  • Validate the copying of arrangement on the target support with a warning message computed from the rules context (severity = 1)
  • Forbid copy arrangement on the target support with a warning message computed from the rules context (severity = 2).

This rule is triggered when target support is selected while using the Copy Arrangement command.

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject: Source support selected.
  • Parameters corresponds to the context object.
  • Validation
  • Severity messages:
    • 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
SourceSupportInstanceVPMInstance ReadSelected source support.

Its reference has a SharedSupportPart type.

TargetSupportInstance VPMInstanceRead Selected target support.

Its reference has a SharedSupportPart type.

Sample

The following sample illustrates the business rule syntax.

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

let SrcSpt(Support)
let TgtSpt(Support)
let SrcName(STRING)
let TgtName(STRING)
let SubType(STRING)
set SrcSpt = Parameters.GetAttributeObject("SourceSupportInstance")
set TgtSpt = Parameters.GetAttributeObject("TargetSupportInstance")

if((NULL == SrcSpt) or (NULL == TgtSpt))
{
   Validation = false
   Parameters.Severity = 2
   Parameters.Message = "Param NULL"
}
else
{
   set SrcName = SrcSpt.Name
   set TgtName = TgtSpt.Name
}
{
if (SrcName == TgtName)
{
   Validation = false
   Parameters.Severity = 2
   Parameters.Message = "Not allowed"
}
else
{
   Validation = true
   Parameters.Severity = 1
   Parameters.Message = "allowed with warning"
}