General InformationThis opening ID is
invoked only on the VPMReference/VPMInstance Tooling Product
( This opening ID is used to customize:
The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample checks and
/*=================================== */
/* 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.IsASortOf("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.IsASortOf(TargetPLMType)== true) or
(0 <= TargetType.Search("AnyComponent", 0, true)) )
Parameters.Severity =0
/* Test Error */
if (ThisObject.IsASortOf("TlgUserComponent")== true)
Parameters.Severity =2
}
if (VDiscipline =="ToolingMobileUnit")
{
if((ThisObject.IsASortOf(TargetPLMType)== true) or
(0 <= TargetType.Search("AnyMobileUnit", 0, true)) )
Parameters.Severity =0
}
if ((VDiscipline =="ToolingTool") or (VDiscipline == "ToolingPart"))
{
if((ThisObject.IsASortOf(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."
}
| |||||||||||||||||||||||||||||