Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
L2PPhysicalElement | Feature |
Read | Physical element linked to ThisObject . |
Sample
The following sample illustrates the syntax of the business rule.
Let EleLogicalCable1 (EleLogicalCable)
Let EleLogicalWire1 (EleLogicalWire)
Let Conductor1 (Conductor)
Let ConductorGroup1 (ConductorGroup)
Let sLogName (STRING)Let sPhysName (STRING)
Let physicalObj (Feature)physicalObj = Parameters.GetAttributeObject("L2PPhysicalElement")
if( NULL == physicalObj)
{
Parameters.Severity = 2
Parameters.Message = "Corresponding Physical NOT found"
Validation = false
}
else
{
set Conductor1 = physicalObj
set ConductorGroup1 = physicalObj
set EleLogicalCable1 = ThisObject
set EleLogicalWire1 = ThisObject
if( ( (NULL <> EleLogicalCable1) and (NULL <> ConductorGroup1) ) or ( (NULL <> EleLogicalWire1) and (NULL <> Conductor1) ) )
{
sLogName = ThisObject.PLM_ExternalID
sPhysName = physicalObj.Name
if( sLogName == sPhysName)
{
Validation = true
Parameters.Severity = 0
Parameters.Message = "Copying attributes allowed"
}
else
{
Validation = false
Parameters.Severity = 2
Parameters.Message = "Copying attributes NOT allowed"
}
}
else
{
Parameters.Severity = 2
Parameters.Message = "Invalid Logical or physical objects"
Validation = false
}
}