Validate Device Connection (ELBConnect_ValidateDevicesToConnect)

An opening ID is an entry point used to customize business logic. The Validate device connection opening ID is available in the Electrical physical system design resources set and it is used to validate device connections.

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 the Connecting Electrical Devices command. See Electrical 3D Design User's Guide: Connecting Electrical Devices: Connecting Electrical Devices.

This opening ID is used to check if two electrical parts instances can be connected together. The connection will be either accepted or refused by the business logic. In both cases, a message or warning (defined by the user) will be displayed, for example:

  • Error: SubType Attributes Not matched, connection forbidden.
  • Warning: SubType Attributes are not set on one or both devices. Continue?

The business rule can either:

  • validate the connection (severity=0)
  • or validate the connection with a warning message computed from the rules context (severity=1)
  • or forbid the connection with a warning message computed from the rules context (severity=2)

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject: First electrical part instance selected for connect.
  • Parameters corresponds to the context object. Standard context and message attribute are displayed in a warning if the validation fails.
  • Validation: Variable to set to know if the validation succeeded or 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
ElecInstance1PLM Entity Readfirst electrical Instance to connect
ElecPort1PLM EntityReadport of first instance to connect
ElecInstance2PLM EntityReadsecond electrical Instance to connect (can be null if connection of splice on bundle segment splice connection point)
ElecBundleSegmentPLM EntityReadsecond electrical bundle segment to connect (can be null if connection on device instance)
ElecPort2PLM EntityReadport of second instance to connect (can be null if connection to bundle segment splice connection point)
ElecSpliceConnectionPoint2PLM EntityReadSpliceConnectionPoint of bundle segment to connect (can be null if connection on device instance)

Sample 1

The following sample explains how to implement an opening ID to manage the connection between devices.

let SubType1(STRING)
let SubType2(STRING)

let SIC1(Elec3DSingleInsertConnector)
let SIC2(Elec3DSingleInsertConnector)
let SIC1Inst(VPMInstance)
let SIC2Inst(VPMInstance)

  set SIC1Inst = Parameters->GetAttributeObject("ElecInstance1")
  set SIC2Inst = Parameters->GetAttributeObject("ElecInstance2")

  if ( SIC1Inst <> NULL ) 
  {
    set SIC1=SIC1Inst.Reference
  }
  if ( SIC2Inst <> NULL ) 
  {
   set SIC2=SIC2Inst.Reference
  } 

if((SIC1 <> NULL) and (SIC2 <> NULL))
{
                SubType1 = SIC1.V_Elec_SubType
                SubType2 = SIC2.V_Elec_SubType
                                                
                if(("" == SubType1) OR ("" == SubType2))
                {
                                Validation = true
                                Parameters.Severity = 1
                                Parameters.Message = "Warning : SubType Attributes are not set on one or both devices; Continue?"
                                Trace (1, "Rule succeeded with Warning : " + Parameters.Message)
                }
                else if(SubType1 <>SubType2)
                {
                                Validation = false                            
                                Parameters.Severity = 2
                                Parameters.Message = "Error: SubType Attributes Not matched, connection forbidden"                
                                Trace (1, "Rule Failed Error : " + Parameters.Message)
                }
                else
                {
                                Validation = true
                                Parameters.Severity = 0
                                Parameters.Message = "Business Rule allows this Connection"                                                 
                }
}

Sample 2

The following sample explain how to implement an opening ID to manage the connection between a splice and a segment.

let SubType1(STRING)
let SubType2(STRING)

let Splice1(Elec3DSplice)
let SegmentToConnect(Segment)
let Splice1Inst(VPMInstance)

set SegmentToConnect = Parameters->GetAttributeObject("ElecBundleSegment")

if ( SegmentToConnect <> NULL ) 
{
  set Splice1Inst = Parameters->GetAttributeObject("ElecInstance1")
  if ( Splice1Inst <> NULL ) 

  {
    set  Splice1=Splice1Inst.Reference
  }
}

if((Splice1 <> NULL) and (SegmentToConnect <> NULL))
{
                Trace (1, "1 - " + Splice1.PLM_ExternalID  + "   2 - " + SegmentToConnect.Name) 

                SubType1 = Splice1.V_Elec_SubType
                SubType2 = SegmentToConnect.Elec_SubType
                Trace (1, "1 - " + SubType1 + "  " + "2 - " + SubType2)
                
                if(("" == SubType1) OR ("" == SubType2))
                {
                                Validation = true
                                Parameters.Severity = 1
                                Parameters.Message = "Warning : SubType Attributes are not set on one or both devices; Continue?"
                                Trace (1, "Rule succeeded with Warning : " + Parameters.Message)
                }
                else if(SubType1 <>SubType2)
                {
                                Validation = false                            
                                Parameters.Severity = 2
                                Parameters.Message = "Error: SubType Attributes Not matched, connection forbidden"                
                                Trace (1, "Rule Failed Error : " + Parameters.Message)
                }
                else
                {
                                Validation = true
                                Parameters.Severity = 0
                                Parameters.Message = "Business Rule allows this Connection"                                                 
                }
}