General InformationThis opening ID is invoked during the Linking Electrical Devices command. See Electrical 3D Design User's Guide: Importing Electrical Data: Linking Electrical Devices. This opening ID is used to check:
The Business Rule can either:
The table below provides you with information related to the definition of the Opening ID.
Input ObjectsThis validation business rule is triggered when an object, to be placed or linked, is selected in Manage Links. For Place operation, the business rule is used after the instance is created in the active product. Input objects must be of the following types:
Context Object Parameters
SampleThe following sample explains how to use an opening ID to check the links between electrical devices. /* CATRule signature (do not edit) :
(ThisObject : #In PLMProductInstanceDS, Parameters
: #In RuleContext, Validation : #Out Boolean)
: #Void */
Let Owner(Feature)
let sOwnerName(String)
let sDevice(String)
let sHarness(String)
let sSystem(String)
sHarness = Parameters.GetAttributeString("HarnessName")
sSystem = Parameters.GetAttributeString("SystemName")
sDevice = Parameters.GetAttributeString("DeviceName")
set Owner = ThisObject.Owner
if(NULL <> Owner)
{
sOwnerName = Owner.Name
if(0 <= sOwnerName->Search(sHarness))
{
Validation = true
Parameters.Severity = 0
Parameters.Message = "Link Valid"
}
else if(0 <= sSystem->Search(sOwnerName))
{
Validation = true
Parameters.Severity = 1
Parameters.Message = "Business Rule Warning: "
+ sDevice + " is placed in " + sOwnerName
}
else
{
Validation = false
Parameters.Severity = 2
if(sOwnerName <> "Harness2_IncorrectForLink")
Parameters.Message = "Business Rule Error: "
+ sDevice + " cannot be placed in " + sOwnerName
+ ". It should be placed in " +
sHarness + "/" + sSystem
}
} | |||||||||||||||||||||||||||||||||||||||||