Validate Engineering Connection (TLG_EngConnectionCheck)

An opening ID is an entry point used to customize business logic. Validate Engineering Connection (TLG_EngConnectionCheck) checks, validates and creates engineering connections in Insert Tooling Products, Insert Tooling System, or Ejection Wizard.

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 only on the VPMReference/VPMInstance Tooling Product (ToPlacePrd)with PLM Types that contain a Hook (that defines the reference AxisSystem used to create the engineering connection).

This opening ID is used to customize:

  • Insert Tooling Products
  • Insert Tooling System
  • Ejection Wizard

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject:
    • ToolingComponent
    • ToolingMobileUnit
    • ToolingTool
    • ToolingPart
  • Parameters corresponds to the context object:
    • ToPlacePrd: To Place Tooling Product Reference to connect (ToolingComponent, ToolingMobileUnit, ToolingTool, ToolingPart)
    • ToPlacePort: Hook of the To Place Tooling Product.
    • TargetPrd: Target Instance (Tooling or not Tooling Product) . It must have an Anchor.
    • TargetPort: Anchor of the Target Instance. The attribute V_HookingPointName defines the expected PLM Type.
  • Validation: Variable to set to know if the validation succeeded of failed
    • 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 Name Type Read/Write Comments
ToPlacePort VPMPort + extension CATAsm3DPosition Write Hook of the To Place Tooling Product
Target Prd VPMInstance Write Target Product (Tooling Product or not)

Must have an Anchor

TargetPort VPMPort + extension CATAsm3DPosition Write Anchor of the Target Product (Tooling Product or not)

V_HookingPointName defines the expected PLM Type

Sample

The following sample checks and

  • either validates the connection (severity=0)
  • or validates the connection with a warning computed from the rules context (severity=1)
  • or forbids the connection with an error message computed from the rules context (severity=2)

 /*=================================== */
 /* File: TLG_EngConnectincheck.CATRule */
 /* =================================== */

 /* =================*/
 /* Declaration */
 /* =================*/

 /* 4 Inputs of the BL*/
let ToPlacePrd(VPMInstance)
let ToPlacePort(VPMPort)
let TargetPrd(VPMInstance)
let ToPlacePort(VPMPort)
  
let TargetType(String)
let TargetPLMType(String) 
let PLMExtension(Boolean) 
Let VDiscipline="" 
Let PrimaryType(String) 
let iSearch(Integer) 

let ToPlacePort3DPosExt(CATAsm3DPosition) 
let TargetPort3DPosExt(CATAsm3DPosition) 

/* =================*/
/* Init input */
/* =================*/
set ToPlacePrd = ThisObject 
set ToPlacePort = Parameters.GetAttributeObject("ToPlacePort") 
set TargetPrd = Parameters.GetAttributeObject("TargetPrd") 
set TargetPort = Parameters.GetAttributeObject("TargetPort") 

set PrimaryType = ThisObject.PrimaryType 
set ToPlacePort3DPosExt = ToPlacePort 
set TargetPort3DPosExt = TargetPort 

set TargetType = TargetPort3DPosExt.V_HookingPointName 
iSearch = 0 
iSearch = TargetType.Search("_") 
TargetPLMType = TargetType.Extract(0,iSearch) 
TargetPLMType = "Tlg" + TargetPLMType 

set PLMExtension = false 
if(ThisObject.IsSupporting("ToolingExtension") == true) 
             PLMExtension = true 
if(ThisObject->HasAttribute("V_discipline") == true) 
      VDiscipline =ThisObject->GetAttributeString("V_discipline") 

/* =================*/ 
/* Check management*/ 
/* =================*/ 

/* BL Check */
Parameters.Severity =1 
if (VDiscipline =="ToolingComponent") 
{ 
      if((ThisObject.IsSupporting(TargetPLMType)== true) or 
    (0 <= TargetType.Search("AnyComponent", 0, true)) ) 
          Parameters.Severity =0 
      /* Test Error */
      if (ThisObject.IsSupporting("TlgUserComponent")== true) 
          Parameters.Severity =2 
} 
if (VDiscipline =="ToolingMobileUnit") 
{ 
      if((ThisObject.IsSupporting(TargetPLMType)== true) or 
    (0 <= TargetType.Search("AnyMobileUnit", 0, true)) ) 
          Parameters.Severity =0 
} 
if ((VDiscipline =="ToolingTool") or (VDiscipline == "ToolingPart")) 
{
      if((ThisObject.IsSupporting(TargetPLMType)== true) ) 
          Parameters.Severity =0 
} 
/* =================*/ 
/* Return management*/ 
/* =================*/ 

if(Parameters.Severity ==0) 
{ 
Validation = True 
Parameters.Message = "Create: the engineering connection is created on the Tooling Product to
insert because it supports the Anchor expected PLM Type:" +TargetPLMType 
} 
else if(Parameters.Severity ==1) 
{ 
Validation = True Parameters.Message = "Warning: the engineering connection is created on 
the Tooling Product to insert, but it does not support the Anchor expected PLM Type:" + TargetPLMType 
}
else if(Parameters.Severity ==2) 
{ 
Validation = False Parameters.Message = "Error: the engineering connection is not created on 
the Tooling Product because it is forbidden." 
}