Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
SystemName(input string) | PLM Entity |
Read | XML system Name (that contains the XML device object). A new API is needed to retrieve the system name from any object. The system name is actually the XML file name. |
HarnessID (input string) | String |
Read | XML Harness ID (if the XML device object is linked to an XML harness).The Harness ID can be retrieved for any connector, splice, conductor or conductor group. |
DeviceName | String |
Read | |
X (input real); X value from XML | String |
Read | |
Y (input real): Y value from XML | String |
Read | |
Z (input real): Z value from XML | String |
Read | |
Sample
The 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
}
}